mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-622abed99ba83445/out/
asluav.rs

1#![doc = "MAVLink ASLUAV dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#![allow(clippy::match_single_binding)]
6#[cfg(feature = "arbitrary")]
7use arbitrary::Arbitrary;
8#[allow(unused_imports)]
9use bitflags::{bitflags, Flags};
10#[allow(unused_imports)]
11use mavlink_core::{
12    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
13};
14#[allow(unused_imports)]
15use num_derive::{FromPrimitive, ToPrimitive};
16#[allow(unused_imports)]
17use num_traits::{FromPrimitive, ToPrimitive};
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
23#[cfg_attr(feature = "ts", derive(TS))]
24#[cfg_attr(feature = "ts", ts(export))]
25#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
26#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27#[cfg_attr(feature = "serde", serde(tag = "type"))]
28#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29#[repr(u32)]
30#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
31pub enum ActuatorConfiguration {
32    #[doc = "Do nothing."]
33    ACTUATOR_CONFIGURATION_NONE = 0,
34    #[doc = "Command the actuator to beep now."]
35    ACTUATOR_CONFIGURATION_BEEP = 1,
36    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
37    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
38    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
40    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
41    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
44}
45impl ActuatorConfiguration {
46    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
47}
48impl Default for ActuatorConfiguration {
49    fn default() -> Self {
50        Self::DEFAULT
51    }
52}
53#[cfg_attr(feature = "ts", derive(TS))]
54#[cfg_attr(feature = "ts", ts(export))]
55#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
56#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
57#[cfg_attr(feature = "serde", serde(tag = "type"))]
58#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
59#[repr(u32)]
60#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
61pub enum ActuatorOutputFunction {
62    #[doc = "No function (disabled)."]
63    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
64    #[doc = "Motor 1"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
66    #[doc = "Motor 2"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
68    #[doc = "Motor 3"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
70    #[doc = "Motor 4"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
72    #[doc = "Motor 5"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
74    #[doc = "Motor 6"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
76    #[doc = "Motor 7"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
78    #[doc = "Motor 8"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
80    #[doc = "Motor 9"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
82    #[doc = "Motor 10"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
84    #[doc = "Motor 11"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
86    #[doc = "Motor 12"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
88    #[doc = "Motor 13"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
90    #[doc = "Motor 14"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
92    #[doc = "Motor 15"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
94    #[doc = "Motor 16"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
96    #[doc = "Servo 1"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
98    #[doc = "Servo 2"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
100    #[doc = "Servo 3"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
102    #[doc = "Servo 4"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
104    #[doc = "Servo 5"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
106    #[doc = "Servo 6"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
108    #[doc = "Servo 7"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
110    #[doc = "Servo 8"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
112    #[doc = "Servo 9"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
114    #[doc = "Servo 10"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
116    #[doc = "Servo 11"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
118    #[doc = "Servo 12"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
120    #[doc = "Servo 13"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
122    #[doc = "Servo 14"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
124    #[doc = "Servo 15"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
126    #[doc = "Servo 16"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
128}
129impl ActuatorOutputFunction {
130    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
131}
132impl Default for ActuatorOutputFunction {
133    fn default() -> Self {
134        Self::DEFAULT
135    }
136}
137#[cfg_attr(feature = "ts", derive(TS))]
138#[cfg_attr(feature = "ts", ts(export))]
139#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
141#[cfg_attr(feature = "serde", serde(tag = "type"))]
142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
143#[repr(u32)]
144#[doc = "Enumeration of the ADSB altimeter types"]
145pub enum AdsbAltitudeType {
146    #[doc = "Altitude reported from a Baro source using QNH reference"]
147    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
148    #[doc = "Altitude reported from a GNSS source"]
149    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
150}
151impl AdsbAltitudeType {
152    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
153}
154impl Default for AdsbAltitudeType {
155    fn default() -> Self {
156        Self::DEFAULT
157    }
158}
159#[cfg_attr(feature = "ts", derive(TS))]
160#[cfg_attr(feature = "ts", ts(export))]
161#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
163#[cfg_attr(feature = "serde", serde(tag = "type"))]
164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
165#[repr(u32)]
166#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
167pub enum AdsbEmitterType {
168    ADSB_EMITTER_TYPE_NO_INFO = 0,
169    ADSB_EMITTER_TYPE_LIGHT = 1,
170    ADSB_EMITTER_TYPE_SMALL = 2,
171    ADSB_EMITTER_TYPE_LARGE = 3,
172    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
173    ADSB_EMITTER_TYPE_HEAVY = 5,
174    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
175    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
176    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
177    ADSB_EMITTER_TYPE_GLIDER = 9,
178    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
179    ADSB_EMITTER_TYPE_PARACHUTE = 11,
180    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
181    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
182    ADSB_EMITTER_TYPE_UAV = 14,
183    ADSB_EMITTER_TYPE_SPACE = 15,
184    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
185    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
186    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
187    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
188}
189impl AdsbEmitterType {
190    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
191}
192impl Default for AdsbEmitterType {
193    fn default() -> Self {
194        Self::DEFAULT
195    }
196}
197bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
198impl AdsbFlags {
199    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
200}
201impl Default for AdsbFlags {
202    fn default() -> Self {
203        Self::DEFAULT
204    }
205}
206bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
207impl AisFlags {
208    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
209}
210impl Default for AisFlags {
211    fn default() -> Self {
212        Self::DEFAULT
213    }
214}
215#[cfg_attr(feature = "ts", derive(TS))]
216#[cfg_attr(feature = "ts", ts(export))]
217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
219#[cfg_attr(feature = "serde", serde(tag = "type"))]
220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
221#[repr(u32)]
222#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
223pub enum AisNavStatus {
224    #[doc = "Under way using engine."]
225    UNDER_WAY = 0,
226    AIS_NAV_ANCHORED = 1,
227    AIS_NAV_UN_COMMANDED = 2,
228    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
229    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
230    AIS_NAV_MOORED = 5,
231    AIS_NAV_AGROUND = 6,
232    AIS_NAV_FISHING = 7,
233    AIS_NAV_SAILING = 8,
234    AIS_NAV_RESERVED_HSC = 9,
235    AIS_NAV_RESERVED_WIG = 10,
236    AIS_NAV_RESERVED_1 = 11,
237    AIS_NAV_RESERVED_2 = 12,
238    AIS_NAV_RESERVED_3 = 13,
239    #[doc = "Search And Rescue Transponder."]
240    AIS_NAV_AIS_SART = 14,
241    #[doc = "Not available (default)."]
242    AIS_NAV_UNKNOWN = 15,
243}
244impl AisNavStatus {
245    pub const DEFAULT: Self = Self::UNDER_WAY;
246}
247impl Default for AisNavStatus {
248    fn default() -> Self {
249        Self::DEFAULT
250    }
251}
252#[cfg_attr(feature = "ts", derive(TS))]
253#[cfg_attr(feature = "ts", ts(export))]
254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
256#[cfg_attr(feature = "serde", serde(tag = "type"))]
257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
258#[repr(u32)]
259#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
260pub enum AisType {
261    #[doc = "Not available (default)."]
262    AIS_TYPE_UNKNOWN = 0,
263    AIS_TYPE_RESERVED_1 = 1,
264    AIS_TYPE_RESERVED_2 = 2,
265    AIS_TYPE_RESERVED_3 = 3,
266    AIS_TYPE_RESERVED_4 = 4,
267    AIS_TYPE_RESERVED_5 = 5,
268    AIS_TYPE_RESERVED_6 = 6,
269    AIS_TYPE_RESERVED_7 = 7,
270    AIS_TYPE_RESERVED_8 = 8,
271    AIS_TYPE_RESERVED_9 = 9,
272    AIS_TYPE_RESERVED_10 = 10,
273    AIS_TYPE_RESERVED_11 = 11,
274    AIS_TYPE_RESERVED_12 = 12,
275    AIS_TYPE_RESERVED_13 = 13,
276    AIS_TYPE_RESERVED_14 = 14,
277    AIS_TYPE_RESERVED_15 = 15,
278    AIS_TYPE_RESERVED_16 = 16,
279    AIS_TYPE_RESERVED_17 = 17,
280    AIS_TYPE_RESERVED_18 = 18,
281    AIS_TYPE_RESERVED_19 = 19,
282    #[doc = "Wing In Ground effect."]
283    AIS_TYPE_WIG = 20,
284    AIS_TYPE_WIG_HAZARDOUS_A = 21,
285    AIS_TYPE_WIG_HAZARDOUS_B = 22,
286    AIS_TYPE_WIG_HAZARDOUS_C = 23,
287    AIS_TYPE_WIG_HAZARDOUS_D = 24,
288    AIS_TYPE_WIG_RESERVED_1 = 25,
289    AIS_TYPE_WIG_RESERVED_2 = 26,
290    AIS_TYPE_WIG_RESERVED_3 = 27,
291    AIS_TYPE_WIG_RESERVED_4 = 28,
292    AIS_TYPE_WIG_RESERVED_5 = 29,
293    AIS_TYPE_FISHING = 30,
294    AIS_TYPE_TOWING = 31,
295    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
296    AIS_TYPE_TOWING_LARGE = 32,
297    #[doc = "Dredging or other underwater ops."]
298    AIS_TYPE_DREDGING = 33,
299    AIS_TYPE_DIVING = 34,
300    AIS_TYPE_MILITARY = 35,
301    AIS_TYPE_SAILING = 36,
302    AIS_TYPE_PLEASURE = 37,
303    AIS_TYPE_RESERVED_20 = 38,
304    AIS_TYPE_RESERVED_21 = 39,
305    #[doc = "High Speed Craft."]
306    AIS_TYPE_HSC = 40,
307    AIS_TYPE_HSC_HAZARDOUS_A = 41,
308    AIS_TYPE_HSC_HAZARDOUS_B = 42,
309    AIS_TYPE_HSC_HAZARDOUS_C = 43,
310    AIS_TYPE_HSC_HAZARDOUS_D = 44,
311    AIS_TYPE_HSC_RESERVED_1 = 45,
312    AIS_TYPE_HSC_RESERVED_2 = 46,
313    AIS_TYPE_HSC_RESERVED_3 = 47,
314    AIS_TYPE_HSC_RESERVED_4 = 48,
315    AIS_TYPE_HSC_UNKNOWN = 49,
316    AIS_TYPE_PILOT = 50,
317    #[doc = "Search And Rescue vessel."]
318    AIS_TYPE_SAR = 51,
319    AIS_TYPE_TUG = 52,
320    AIS_TYPE_PORT_TENDER = 53,
321    #[doc = "Anti-pollution equipment."]
322    AIS_TYPE_ANTI_POLLUTION = 54,
323    AIS_TYPE_LAW_ENFORCEMENT = 55,
324    AIS_TYPE_SPARE_LOCAL_1 = 56,
325    AIS_TYPE_SPARE_LOCAL_2 = 57,
326    AIS_TYPE_MEDICAL_TRANSPORT = 58,
327    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
328    AIS_TYPE_NONECOMBATANT = 59,
329    AIS_TYPE_PASSENGER = 60,
330    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
331    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
332    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
333    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
334    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
335    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
336    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
337    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
338    AIS_TYPE_PASSENGER_UNKNOWN = 69,
339    AIS_TYPE_CARGO = 70,
340    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
341    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
342    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
343    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
344    AIS_TYPE_CARGO_RESERVED_1 = 75,
345    AIS_TYPE_CARGO_RESERVED_2 = 76,
346    AIS_TYPE_CARGO_RESERVED_3 = 77,
347    AIS_TYPE_CARGO_RESERVED_4 = 78,
348    AIS_TYPE_CARGO_UNKNOWN = 79,
349    AIS_TYPE_TANKER = 80,
350    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
351    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
352    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
353    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
354    AIS_TYPE_TANKER_RESERVED_1 = 85,
355    AIS_TYPE_TANKER_RESERVED_2 = 86,
356    AIS_TYPE_TANKER_RESERVED_3 = 87,
357    AIS_TYPE_TANKER_RESERVED_4 = 88,
358    AIS_TYPE_TANKER_UNKNOWN = 89,
359    AIS_TYPE_OTHER = 90,
360    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
361    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
362    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
363    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
364    AIS_TYPE_OTHER_RESERVED_1 = 95,
365    AIS_TYPE_OTHER_RESERVED_2 = 96,
366    AIS_TYPE_OTHER_RESERVED_3 = 97,
367    AIS_TYPE_OTHER_RESERVED_4 = 98,
368    AIS_TYPE_OTHER_UNKNOWN = 99,
369}
370impl AisType {
371    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
372}
373impl Default for AisType {
374    fn default() -> Self {
375        Self::DEFAULT
376    }
377}
378bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
379impl AttitudeTargetTypemask {
380    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
381}
382impl Default for AttitudeTargetTypemask {
383    fn default() -> Self {
384        Self::DEFAULT
385    }
386}
387#[cfg_attr(feature = "ts", derive(TS))]
388#[cfg_attr(feature = "ts", ts(export))]
389#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
391#[cfg_attr(feature = "serde", serde(tag = "type"))]
392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
393#[repr(u32)]
394#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
395pub enum AutotuneAxis {
396    #[doc = "Autotune roll axis."]
397    AUTOTUNE_AXIS_ROLL = 1,
398    #[doc = "Autotune pitch axis."]
399    AUTOTUNE_AXIS_PITCH = 2,
400    #[doc = "Autotune yaw axis."]
401    AUTOTUNE_AXIS_YAW = 4,
402}
403impl AutotuneAxis {
404    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
405}
406impl Default for AutotuneAxis {
407    fn default() -> Self {
408        Self::DEFAULT
409    }
410}
411bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
412impl CameraCapFlags {
413    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
414}
415impl Default for CameraCapFlags {
416    fn default() -> Self {
417        Self::DEFAULT
418    }
419}
420#[cfg_attr(feature = "ts", derive(TS))]
421#[cfg_attr(feature = "ts", ts(export))]
422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
424#[cfg_attr(feature = "serde", serde(tag = "type"))]
425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
426#[repr(u32)]
427#[doc = "Camera Modes."]
428pub enum CameraMode {
429    #[doc = "Camera is in image/photo capture mode."]
430    CAMERA_MODE_IMAGE = 0,
431    #[doc = "Camera is in video capture mode."]
432    CAMERA_MODE_VIDEO = 1,
433    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
434    CAMERA_MODE_IMAGE_SURVEY = 2,
435}
436impl CameraMode {
437    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
438}
439impl Default for CameraMode {
440    fn default() -> Self {
441        Self::DEFAULT
442    }
443}
444#[cfg_attr(feature = "ts", derive(TS))]
445#[cfg_attr(feature = "ts", ts(export))]
446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
448#[cfg_attr(feature = "serde", serde(tag = "type"))]
449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
450#[repr(u32)]
451#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
452pub enum CameraSource {
453    #[doc = "Default camera source."]
454    CAMERA_SOURCE_DEFAULT = 0,
455    #[doc = "RGB camera source."]
456    CAMERA_SOURCE_RGB = 1,
457    #[doc = "IR camera source."]
458    CAMERA_SOURCE_IR = 2,
459    #[doc = "NDVI camera source."]
460    CAMERA_SOURCE_NDVI = 3,
461}
462impl CameraSource {
463    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
464}
465impl Default for CameraSource {
466    fn default() -> Self {
467        Self::DEFAULT
468    }
469}
470#[cfg_attr(feature = "ts", derive(TS))]
471#[cfg_attr(feature = "ts", ts(export))]
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking modes"]
478pub enum CameraTrackingMode {
479    #[doc = "Not tracking"]
480    CAMERA_TRACKING_MODE_NONE = 0,
481    #[doc = "Target is a point"]
482    CAMERA_TRACKING_MODE_POINT = 1,
483    #[doc = "Target is a rectangle"]
484    CAMERA_TRACKING_MODE_RECTANGLE = 2,
485}
486impl CameraTrackingMode {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
488}
489impl Default for CameraTrackingMode {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494#[cfg_attr(feature = "ts", derive(TS))]
495#[cfg_attr(feature = "ts", ts(export))]
496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
498#[cfg_attr(feature = "serde", serde(tag = "type"))]
499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
500#[repr(u32)]
501#[doc = "Camera tracking status flags"]
502pub enum CameraTrackingStatusFlags {
503    #[doc = "Camera is not tracking"]
504    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
505    #[doc = "Camera is tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
507    #[doc = "Camera tracking in error state"]
508    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
509}
510impl CameraTrackingStatusFlags {
511    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
512}
513impl Default for CameraTrackingStatusFlags {
514    fn default() -> Self {
515        Self::DEFAULT
516    }
517}
518bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
519impl CameraTrackingTargetData {
520    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
521}
522impl Default for CameraTrackingTargetData {
523    fn default() -> Self {
524        Self::DEFAULT
525    }
526}
527#[cfg_attr(feature = "ts", derive(TS))]
528#[cfg_attr(feature = "ts", ts(export))]
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
535pub enum CameraZoomType {
536    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
537    ZOOM_TYPE_STEP = 0,
538    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
539    ZOOM_TYPE_CONTINUOUS = 1,
540    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
541    ZOOM_TYPE_RANGE = 2,
542    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
543    ZOOM_TYPE_FOCAL_LENGTH = 3,
544    #[doc = "Zoom value as horizontal field of view in degrees."]
545    ZOOM_TYPE_HORIZONTAL_FOV = 4,
546}
547impl CameraZoomType {
548    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
549}
550impl Default for CameraZoomType {
551    fn default() -> Self {
552        Self::DEFAULT
553    }
554}
555#[cfg_attr(feature = "ts", derive(TS))]
556#[cfg_attr(feature = "ts", ts(export))]
557#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
559#[cfg_attr(feature = "serde", serde(tag = "type"))]
560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
561#[repr(u32)]
562pub enum CanFilterOp {
563    CAN_FILTER_REPLACE = 0,
564    CAN_FILTER_ADD = 1,
565    CAN_FILTER_REMOVE = 2,
566}
567impl CanFilterOp {
568    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
569}
570impl Default for CanFilterOp {
571    fn default() -> Self {
572        Self::DEFAULT
573    }
574}
575#[cfg_attr(feature = "ts", derive(TS))]
576#[cfg_attr(feature = "ts", ts(export))]
577#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
579#[cfg_attr(feature = "serde", serde(tag = "type"))]
580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
581#[repr(u32)]
582#[doc = "Possible responses from a CELLULAR_CONFIG message."]
583pub enum CellularConfigResponse {
584    #[doc = "Changes accepted."]
585    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
586    #[doc = "Invalid APN."]
587    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
588    #[doc = "Invalid PIN."]
589    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
590    #[doc = "Changes rejected."]
591    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
592    #[doc = "PUK is required to unblock SIM card."]
593    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
594}
595impl CellularConfigResponse {
596    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
597}
598impl Default for CellularConfigResponse {
599    fn default() -> Self {
600        Self::DEFAULT
601    }
602}
603#[cfg_attr(feature = "ts", derive(TS))]
604#[cfg_attr(feature = "ts", ts(export))]
605#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
607#[cfg_attr(feature = "serde", serde(tag = "type"))]
608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
609#[repr(u32)]
610#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
611pub enum CellularNetworkFailedReason {
612    #[doc = "No error"]
613    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
614    #[doc = "Error state is unknown"]
615    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
616    #[doc = "SIM is required for the modem but missing"]
617    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
618    #[doc = "SIM is available, but not usable for connection"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
620}
621impl CellularNetworkFailedReason {
622    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
623}
624impl Default for CellularNetworkFailedReason {
625    fn default() -> Self {
626        Self::DEFAULT
627    }
628}
629#[cfg_attr(feature = "ts", derive(TS))]
630#[cfg_attr(feature = "ts", ts(export))]
631#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
633#[cfg_attr(feature = "serde", serde(tag = "type"))]
634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
635#[repr(u32)]
636#[doc = "Cellular network radio type"]
637pub enum CellularNetworkRadioType {
638    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
639    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
640    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
641    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
642    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
643}
644impl CellularNetworkRadioType {
645    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
646}
647impl Default for CellularNetworkRadioType {
648    fn default() -> Self {
649        Self::DEFAULT
650    }
651}
652#[cfg_attr(feature = "ts", derive(TS))]
653#[cfg_attr(feature = "ts", ts(export))]
654#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
656#[cfg_attr(feature = "serde", serde(tag = "type"))]
657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
658#[repr(u32)]
659#[doc = "These flags encode the cellular network status"]
660pub enum CellularStatusFlag {
661    #[doc = "State unknown or not reportable."]
662    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
663    #[doc = "Modem is unusable"]
664    CELLULAR_STATUS_FLAG_FAILED = 1,
665    #[doc = "Modem is being initialized"]
666    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
667    #[doc = "Modem is locked"]
668    CELLULAR_STATUS_FLAG_LOCKED = 3,
669    #[doc = "Modem is not enabled and is powered down"]
670    CELLULAR_STATUS_FLAG_DISABLED = 4,
671    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
672    CELLULAR_STATUS_FLAG_DISABLING = 5,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
674    CELLULAR_STATUS_FLAG_ENABLING = 6,
675    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
676    CELLULAR_STATUS_FLAG_ENABLED = 7,
677    #[doc = "Modem is searching for a network provider to register"]
678    CELLULAR_STATUS_FLAG_SEARCHING = 8,
679    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
680    CELLULAR_STATUS_FLAG_REGISTERED = 9,
681    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
682    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
683    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
684    CELLULAR_STATUS_FLAG_CONNECTING = 11,
685    #[doc = "One or more packet data bearers is active and connected"]
686    CELLULAR_STATUS_FLAG_CONNECTED = 12,
687}
688impl CellularStatusFlag {
689    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
690}
691impl Default for CellularStatusFlag {
692    fn default() -> Self {
693        Self::DEFAULT
694    }
695}
696#[cfg_attr(feature = "ts", derive(TS))]
697#[cfg_attr(feature = "ts", ts(export))]
698#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
700#[cfg_attr(feature = "serde", serde(tag = "type"))]
701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
702#[repr(u32)]
703#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
704pub enum CompMetadataType {
705    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
706    COMP_METADATA_TYPE_GENERAL = 0,
707    #[doc = "Parameter meta data."]
708    COMP_METADATA_TYPE_PARAMETER = 1,
709    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
710    COMP_METADATA_TYPE_COMMANDS = 2,
711    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
712    COMP_METADATA_TYPE_PERIPHERALS = 3,
713    #[doc = "Meta data for the events interface."]
714    COMP_METADATA_TYPE_EVENTS = 4,
715    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
716    COMP_METADATA_TYPE_ACTUATORS = 5,
717}
718impl CompMetadataType {
719    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
720}
721impl Default for CompMetadataType {
722    fn default() -> Self {
723        Self::DEFAULT
724    }
725}
726#[cfg_attr(feature = "ts", derive(TS))]
727#[cfg_attr(feature = "ts", ts(export))]
728#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
730#[cfg_attr(feature = "serde", serde(tag = "type"))]
731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
732#[repr(u32)]
733#[doc = "Indicates the ESC connection type."]
734pub enum EscConnectionType {
735    #[doc = "Traditional PPM ESC."]
736    ESC_CONNECTION_TYPE_PPM = 0,
737    #[doc = "Serial Bus connected ESC."]
738    ESC_CONNECTION_TYPE_SERIAL = 1,
739    #[doc = "One Shot PPM ESC."]
740    ESC_CONNECTION_TYPE_ONESHOT = 2,
741    #[doc = "I2C ESC."]
742    ESC_CONNECTION_TYPE_I2C = 3,
743    #[doc = "CAN-Bus ESC."]
744    ESC_CONNECTION_TYPE_CAN = 4,
745    #[doc = "DShot ESC."]
746    ESC_CONNECTION_TYPE_DSHOT = 5,
747}
748impl EscConnectionType {
749    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
750}
751impl Default for EscConnectionType {
752    fn default() -> Self {
753        Self::DEFAULT
754    }
755}
756bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
757impl EscFailureFlags {
758    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
759}
760impl Default for EscFailureFlags {
761    fn default() -> Self {
762        Self::DEFAULT
763    }
764}
765bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
766impl EstimatorStatusFlags {
767    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
768}
769impl Default for EstimatorStatusFlags {
770    fn default() -> Self {
771        Self::DEFAULT
772    }
773}
774#[cfg_attr(feature = "ts", derive(TS))]
775#[cfg_attr(feature = "ts", ts(export))]
776#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
778#[cfg_attr(feature = "serde", serde(tag = "type"))]
779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
780#[repr(u32)]
781#[doc = "List of possible failure type to inject."]
782pub enum FailureType {
783    #[doc = "No failure injected, used to reset a previous failure."]
784    FAILURE_TYPE_OK = 0,
785    #[doc = "Sets unit off, so completely non-responsive."]
786    FAILURE_TYPE_OFF = 1,
787    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
788    FAILURE_TYPE_STUCK = 2,
789    #[doc = "Unit is reporting complete garbage."]
790    FAILURE_TYPE_GARBAGE = 3,
791    #[doc = "Unit is consistently wrong."]
792    FAILURE_TYPE_WRONG = 4,
793    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
794    FAILURE_TYPE_SLOW = 5,
795    #[doc = "Data of unit is delayed in time."]
796    FAILURE_TYPE_DELAYED = 6,
797    #[doc = "Unit is sometimes working, sometimes not."]
798    FAILURE_TYPE_INTERMITTENT = 7,
799}
800impl FailureType {
801    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
802}
803impl Default for FailureType {
804    fn default() -> Self {
805        Self::DEFAULT
806    }
807}
808#[cfg_attr(feature = "ts", derive(TS))]
809#[cfg_attr(feature = "ts", ts(export))]
810#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
812#[cfg_attr(feature = "serde", serde(tag = "type"))]
813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
814#[repr(u32)]
815#[doc = "List of possible units where failures can be injected."]
816pub enum FailureUnit {
817    FAILURE_UNIT_SENSOR_GYRO = 0,
818    FAILURE_UNIT_SENSOR_ACCEL = 1,
819    FAILURE_UNIT_SENSOR_MAG = 2,
820    FAILURE_UNIT_SENSOR_BARO = 3,
821    FAILURE_UNIT_SENSOR_GPS = 4,
822    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
823    FAILURE_UNIT_SENSOR_VIO = 6,
824    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
825    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
826    FAILURE_UNIT_SYSTEM_BATTERY = 100,
827    FAILURE_UNIT_SYSTEM_MOTOR = 101,
828    FAILURE_UNIT_SYSTEM_SERVO = 102,
829    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
830    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
831    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
832}
833impl FailureUnit {
834    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
835}
836impl Default for FailureUnit {
837    fn default() -> Self {
838        Self::DEFAULT
839    }
840}
841#[cfg_attr(feature = "ts", derive(TS))]
842#[cfg_attr(feature = "ts", ts(export))]
843#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
845#[cfg_attr(feature = "serde", serde(tag = "type"))]
846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
847#[repr(u32)]
848pub enum FenceBreach {
849    #[doc = "No last fence breach"]
850    FENCE_BREACH_NONE = 0,
851    #[doc = "Breached minimum altitude"]
852    FENCE_BREACH_MINALT = 1,
853    #[doc = "Breached maximum altitude"]
854    FENCE_BREACH_MAXALT = 2,
855    #[doc = "Breached fence boundary"]
856    FENCE_BREACH_BOUNDARY = 3,
857}
858impl FenceBreach {
859    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
860}
861impl Default for FenceBreach {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[cfg_attr(feature = "ts", derive(TS))]
867#[cfg_attr(feature = "ts", ts(export))]
868#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
870#[cfg_attr(feature = "serde", serde(tag = "type"))]
871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
872#[repr(u32)]
873#[doc = "Actions being taken to mitigate/prevent fence breach"]
874pub enum FenceMitigate {
875    #[doc = "Unknown"]
876    FENCE_MITIGATE_UNKNOWN = 0,
877    #[doc = "No actions being taken"]
878    FENCE_MITIGATE_NONE = 1,
879    #[doc = "Velocity limiting active to prevent breach"]
880    FENCE_MITIGATE_VEL_LIMIT = 2,
881}
882impl FenceMitigate {
883    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
884}
885impl Default for FenceMitigate {
886    fn default() -> Self {
887        Self::DEFAULT
888    }
889}
890#[cfg_attr(feature = "ts", derive(TS))]
891#[cfg_attr(feature = "ts", ts(export))]
892#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
894#[cfg_attr(feature = "serde", serde(tag = "type"))]
895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
896#[repr(u32)]
897#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
898pub enum FenceType {
899    #[doc = "Maximum altitude fence"]
900    FENCE_TYPE_ALT_MAX = 1,
901    #[doc = "Circle fence"]
902    FENCE_TYPE_CIRCLE = 2,
903    #[doc = "Polygon fence"]
904    FENCE_TYPE_POLYGON = 4,
905    #[doc = "Minimum altitude fence"]
906    FENCE_TYPE_ALT_MIN = 8,
907}
908impl FenceType {
909    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
910}
911impl Default for FenceType {
912    fn default() -> Self {
913        Self::DEFAULT
914    }
915}
916#[cfg_attr(feature = "ts", derive(TS))]
917#[cfg_attr(feature = "ts", ts(export))]
918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
920#[cfg_attr(feature = "serde", serde(tag = "type"))]
921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
922#[repr(u32)]
923#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
924pub enum FirmwareVersionType {
925    #[doc = "development release"]
926    FIRMWARE_VERSION_TYPE_DEV = 0,
927    #[doc = "alpha release"]
928    FIRMWARE_VERSION_TYPE_ALPHA = 64,
929    #[doc = "beta release"]
930    FIRMWARE_VERSION_TYPE_BETA = 128,
931    #[doc = "release candidate"]
932    FIRMWARE_VERSION_TYPE_RC = 192,
933    #[doc = "official stable release"]
934    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
935}
936impl FirmwareVersionType {
937    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
938}
939impl Default for FirmwareVersionType {
940    fn default() -> Self {
941        Self::DEFAULT
942    }
943}
944bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
945impl GimbalDeviceCapFlags {
946    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
947}
948impl Default for GimbalDeviceCapFlags {
949    fn default() -> Self {
950        Self::DEFAULT
951    }
952}
953bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
954impl GimbalDeviceErrorFlags {
955    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
956}
957impl Default for GimbalDeviceErrorFlags {
958    fn default() -> Self {
959        Self::DEFAULT
960    }
961}
962bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
963impl GimbalDeviceFlags {
964    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
965}
966impl Default for GimbalDeviceFlags {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
972impl GimbalManagerCapFlags {
973    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
974}
975impl Default for GimbalManagerCapFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
981impl GimbalManagerFlags {
982    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
983}
984impl Default for GimbalManagerFlags {
985    fn default() -> Self {
986        Self::DEFAULT
987    }
988}
989#[cfg_attr(feature = "ts", derive(TS))]
990#[cfg_attr(feature = "ts", ts(export))]
991#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
993#[cfg_attr(feature = "serde", serde(tag = "type"))]
994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
995#[repr(u32)]
996#[doc = "Type of GPS fix"]
997pub enum GpsFixType {
998    #[doc = "No GPS connected"]
999    GPS_FIX_TYPE_NO_GPS = 0,
1000    #[doc = "No position information, GPS is connected"]
1001    GPS_FIX_TYPE_NO_FIX = 1,
1002    #[doc = "2D position"]
1003    GPS_FIX_TYPE_2D_FIX = 2,
1004    #[doc = "3D position"]
1005    GPS_FIX_TYPE_3D_FIX = 3,
1006    #[doc = "DGPS/SBAS aided 3D position"]
1007    GPS_FIX_TYPE_DGPS = 4,
1008    #[doc = "RTK float, 3D position"]
1009    GPS_FIX_TYPE_RTK_FLOAT = 5,
1010    #[doc = "RTK Fixed, 3D position"]
1011    GPS_FIX_TYPE_RTK_FIXED = 6,
1012    #[doc = "Static fixed, typically used for base stations"]
1013    GPS_FIX_TYPE_STATIC = 7,
1014    #[doc = "PPP, 3D position."]
1015    GPS_FIX_TYPE_PPP = 8,
1016}
1017impl GpsFixType {
1018    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1019}
1020impl Default for GpsFixType {
1021    fn default() -> Self {
1022        Self::DEFAULT
1023    }
1024}
1025bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1026impl GpsInputIgnoreFlags {
1027    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1028}
1029impl Default for GpsInputIgnoreFlags {
1030    fn default() -> Self {
1031        Self::DEFAULT
1032    }
1033}
1034#[cfg_attr(feature = "ts", derive(TS))]
1035#[cfg_attr(feature = "ts", ts(export))]
1036#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1038#[cfg_attr(feature = "serde", serde(tag = "type"))]
1039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1040#[repr(u32)]
1041#[doc = "Gripper actions."]
1042pub enum GripperActions {
1043    #[doc = "Gripper release cargo."]
1044    GRIPPER_ACTION_RELEASE = 0,
1045    #[doc = "Gripper grab onto cargo."]
1046    GRIPPER_ACTION_GRAB = 1,
1047}
1048impl GripperActions {
1049    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1050}
1051impl Default for GripperActions {
1052    fn default() -> Self {
1053        Self::DEFAULT
1054    }
1055}
1056#[cfg_attr(feature = "ts", derive(TS))]
1057#[cfg_attr(feature = "ts", ts(export))]
1058#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1060#[cfg_attr(feature = "serde", serde(tag = "type"))]
1061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1062#[repr(u32)]
1063pub enum GsmLinkType {
1064    #[doc = "no service"]
1065    GSM_LINK_TYPE_NONE = 0,
1066    #[doc = "link type unknown"]
1067    GSM_LINK_TYPE_UNKNOWN = 1,
1068    #[doc = "2G (GSM/GRPS/EDGE) link"]
1069    GSM_LINK_TYPE_2G = 2,
1070    #[doc = "3G link (WCDMA/HSDPA/HSPA)"]
1071    GSM_LINK_TYPE_3G = 3,
1072    #[doc = "4G link (LTE)"]
1073    GSM_LINK_TYPE_4G = 4,
1074}
1075impl GsmLinkType {
1076    pub const DEFAULT: Self = Self::GSM_LINK_TYPE_NONE;
1077}
1078impl Default for GsmLinkType {
1079    fn default() -> Self {
1080        Self::DEFAULT
1081    }
1082}
1083#[cfg_attr(feature = "ts", derive(TS))]
1084#[cfg_attr(feature = "ts", ts(export))]
1085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1087#[cfg_attr(feature = "serde", serde(tag = "type"))]
1088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1089#[repr(u32)]
1090pub enum GsmModemType {
1091    #[doc = "not specified"]
1092    GSM_MODEM_TYPE_UNKNOWN = 0,
1093    #[doc = "HUAWEI LTE USB Stick E3372"]
1094    GSM_MODEM_TYPE_HUAWEI_E3372 = 1,
1095}
1096impl GsmModemType {
1097    pub const DEFAULT: Self = Self::GSM_MODEM_TYPE_UNKNOWN;
1098}
1099impl Default for GsmModemType {
1100    fn default() -> Self {
1101        Self::DEFAULT
1102    }
1103}
1104bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1105impl HighresImuUpdatedFlags {
1106    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1107}
1108impl Default for HighresImuUpdatedFlags {
1109    fn default() -> Self {
1110        Self::DEFAULT
1111    }
1112}
1113bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1114impl HilActuatorControlsFlags {
1115    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1116}
1117impl Default for HilActuatorControlsFlags {
1118    fn default() -> Self {
1119        Self::DEFAULT
1120    }
1121}
1122bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1123impl HilSensorUpdatedFlags {
1124    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1125}
1126impl Default for HilSensorUpdatedFlags {
1127    fn default() -> Self {
1128        Self::DEFAULT
1129    }
1130}
1131bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1132impl HlFailureFlag {
1133    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1134}
1135impl Default for HlFailureFlag {
1136    fn default() -> Self {
1137        Self::DEFAULT
1138    }
1139}
1140bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1141impl IlluminatorErrorFlags {
1142    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1143}
1144impl Default for IlluminatorErrorFlags {
1145    fn default() -> Self {
1146        Self::DEFAULT
1147    }
1148}
1149#[cfg_attr(feature = "ts", derive(TS))]
1150#[cfg_attr(feature = "ts", ts(export))]
1151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1153#[cfg_attr(feature = "serde", serde(tag = "type"))]
1154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1155#[repr(u32)]
1156#[doc = "Modes of illuminator"]
1157pub enum IlluminatorMode {
1158    #[doc = "Illuminator mode is not specified/unknown"]
1159    ILLUMINATOR_MODE_UNKNOWN = 0,
1160    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1161    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1162    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1163    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1164}
1165impl IlluminatorMode {
1166    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1167}
1168impl Default for IlluminatorMode {
1169    fn default() -> Self {
1170        Self::DEFAULT
1171    }
1172}
1173#[cfg_attr(feature = "ts", derive(TS))]
1174#[cfg_attr(feature = "ts", ts(export))]
1175#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1176#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1177#[cfg_attr(feature = "serde", serde(tag = "type"))]
1178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1179#[repr(u32)]
1180#[doc = "Type of landing target"]
1181pub enum LandingTargetType {
1182    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1183    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1184    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1185    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1186    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1187    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1188    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1189    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1190}
1191impl LandingTargetType {
1192    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1193}
1194impl Default for LandingTargetType {
1195    fn default() -> Self {
1196        Self::DEFAULT
1197    }
1198}
1199#[cfg_attr(feature = "ts", derive(TS))]
1200#[cfg_attr(feature = "ts", ts(export))]
1201#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1203#[cfg_attr(feature = "serde", serde(tag = "type"))]
1204#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1205#[repr(u32)]
1206pub enum MagCalStatus {
1207    MAG_CAL_NOT_STARTED = 0,
1208    MAG_CAL_WAITING_TO_START = 1,
1209    MAG_CAL_RUNNING_STEP_ONE = 2,
1210    MAG_CAL_RUNNING_STEP_TWO = 3,
1211    MAG_CAL_SUCCESS = 4,
1212    MAG_CAL_FAILED = 5,
1213    MAG_CAL_BAD_ORIENTATION = 6,
1214    MAG_CAL_BAD_RADIUS = 7,
1215}
1216impl MagCalStatus {
1217    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1218}
1219impl Default for MagCalStatus {
1220    fn default() -> Self {
1221        Self::DEFAULT
1222    }
1223}
1224#[cfg_attr(feature = "ts", derive(TS))]
1225#[cfg_attr(feature = "ts", ts(export))]
1226#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1228#[cfg_attr(feature = "serde", serde(tag = "type"))]
1229#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1230#[repr(u32)]
1231pub enum MavArmAuthDeniedReason {
1232    #[doc = "Not a specific reason"]
1233    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1234    #[doc = "Authorizer will send the error as string to GCS"]
1235    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1236    #[doc = "At least one waypoint have a invalid value"]
1237    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1238    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1239    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1240    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1241    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1242    #[doc = "Weather is not good to fly"]
1243    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1244}
1245impl MavArmAuthDeniedReason {
1246    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1247}
1248impl Default for MavArmAuthDeniedReason {
1249    fn default() -> Self {
1250        Self::DEFAULT
1251    }
1252}
1253#[cfg_attr(feature = "ts", derive(TS))]
1254#[cfg_attr(feature = "ts", ts(export))]
1255#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1257#[cfg_attr(feature = "serde", serde(tag = "type"))]
1258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1259#[repr(u32)]
1260#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1261pub enum MavAutopilot {
1262    #[doc = "Generic autopilot, full support for everything"]
1263    MAV_AUTOPILOT_GENERIC = 0,
1264    #[doc = "Reserved for future use."]
1265    MAV_AUTOPILOT_RESERVED = 1,
1266    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1267    MAV_AUTOPILOT_SLUGS = 2,
1268    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1269    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1270    #[doc = "OpenPilot, <http://openpilot.org>"]
1271    MAV_AUTOPILOT_OPENPILOT = 4,
1272    #[doc = "Generic autopilot only supporting simple waypoints"]
1273    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1274    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1275    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1276    #[doc = "Generic autopilot supporting the full mission command set"]
1277    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1278    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1279    MAV_AUTOPILOT_INVALID = 8,
1280    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1281    MAV_AUTOPILOT_PPZ = 9,
1282    #[doc = "UAV Dev Board"]
1283    MAV_AUTOPILOT_UDB = 10,
1284    #[doc = "FlexiPilot"]
1285    MAV_AUTOPILOT_FP = 11,
1286    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1287    MAV_AUTOPILOT_PX4 = 12,
1288    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1289    MAV_AUTOPILOT_SMACCMPILOT = 13,
1290    #[doc = "AutoQuad -- <http://autoquad.org>"]
1291    MAV_AUTOPILOT_AUTOQUAD = 14,
1292    #[doc = "Armazila -- <http://armazila.com>"]
1293    MAV_AUTOPILOT_ARMAZILA = 15,
1294    #[doc = "Aerob -- <http://aerob.ru>"]
1295    MAV_AUTOPILOT_AEROB = 16,
1296    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1297    MAV_AUTOPILOT_ASLUAV = 17,
1298    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1299    MAV_AUTOPILOT_SMARTAP = 18,
1300    #[doc = "AirRails - <http://uaventure.com>"]
1301    MAV_AUTOPILOT_AIRRAILS = 19,
1302    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1303    MAV_AUTOPILOT_REFLEX = 20,
1304}
1305impl MavAutopilot {
1306    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1307}
1308impl Default for MavAutopilot {
1309    fn default() -> Self {
1310        Self::DEFAULT
1311    }
1312}
1313#[cfg_attr(feature = "ts", derive(TS))]
1314#[cfg_attr(feature = "ts", ts(export))]
1315#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1317#[cfg_attr(feature = "serde", serde(tag = "type"))]
1318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1319#[repr(u32)]
1320#[doc = "Enumeration for battery charge states."]
1321pub enum MavBatteryChargeState {
1322    #[doc = "Low battery state is not provided"]
1323    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1324    #[doc = "Battery is not in low state. Normal operation."]
1325    MAV_BATTERY_CHARGE_STATE_OK = 1,
1326    #[doc = "Battery state is low, warn and monitor close."]
1327    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1328    #[doc = "Battery state is critical, return or abort immediately."]
1329    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1330    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1331    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1332    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1333    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1334    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1335    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1336    #[doc = "Battery is charging."]
1337    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1338}
1339impl MavBatteryChargeState {
1340    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1341}
1342impl Default for MavBatteryChargeState {
1343    fn default() -> Self {
1344        Self::DEFAULT
1345    }
1346}
1347bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1348impl MavBatteryFault {
1349    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1350}
1351impl Default for MavBatteryFault {
1352    fn default() -> Self {
1353        Self::DEFAULT
1354    }
1355}
1356#[cfg_attr(feature = "ts", derive(TS))]
1357#[cfg_attr(feature = "ts", ts(export))]
1358#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1360#[cfg_attr(feature = "serde", serde(tag = "type"))]
1361#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1362#[repr(u32)]
1363#[doc = "Enumeration of battery functions"]
1364pub enum MavBatteryFunction {
1365    #[doc = "Battery function is unknown"]
1366    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1367    #[doc = "Battery supports all flight systems"]
1368    MAV_BATTERY_FUNCTION_ALL = 1,
1369    #[doc = "Battery for the propulsion system"]
1370    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1371    #[doc = "Avionics battery"]
1372    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1373    #[doc = "Payload battery"]
1374    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1375}
1376impl MavBatteryFunction {
1377    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1378}
1379impl Default for MavBatteryFunction {
1380    fn default() -> Self {
1381        Self::DEFAULT
1382    }
1383}
1384#[cfg_attr(feature = "ts", derive(TS))]
1385#[cfg_attr(feature = "ts", ts(export))]
1386#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1387#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1388#[cfg_attr(feature = "serde", serde(tag = "type"))]
1389#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1390#[repr(u32)]
1391#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1392pub enum MavBatteryMode {
1393    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1394    MAV_BATTERY_MODE_UNKNOWN = 0,
1395    #[doc = "Battery is auto discharging (towards storage level)."]
1396    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1397    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1398    MAV_BATTERY_MODE_HOT_SWAP = 2,
1399}
1400impl MavBatteryMode {
1401    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1402}
1403impl Default for MavBatteryMode {
1404    fn default() -> Self {
1405        Self::DEFAULT
1406    }
1407}
1408#[cfg_attr(feature = "ts", derive(TS))]
1409#[cfg_attr(feature = "ts", ts(export))]
1410#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1411#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1412#[cfg_attr(feature = "serde", serde(tag = "type"))]
1413#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1414#[repr(u32)]
1415#[doc = "Enumeration of battery types"]
1416pub enum MavBatteryType {
1417    #[doc = "Not specified."]
1418    MAV_BATTERY_TYPE_UNKNOWN = 0,
1419    #[doc = "Lithium polymer battery"]
1420    MAV_BATTERY_TYPE_LIPO = 1,
1421    #[doc = "Lithium-iron-phosphate battery"]
1422    MAV_BATTERY_TYPE_LIFE = 2,
1423    #[doc = "Lithium-ION battery"]
1424    MAV_BATTERY_TYPE_LION = 3,
1425    #[doc = "Nickel metal hydride battery"]
1426    MAV_BATTERY_TYPE_NIMH = 4,
1427}
1428impl MavBatteryType {
1429    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1430}
1431impl Default for MavBatteryType {
1432    fn default() -> Self {
1433        Self::DEFAULT
1434    }
1435}
1436#[cfg_attr(feature = "ts", derive(TS))]
1437#[cfg_attr(feature = "ts", ts(export))]
1438#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1439#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1440#[cfg_attr(feature = "serde", serde(tag = "type"))]
1441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1442#[repr(u32)]
1443#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1444pub enum MavCmd {
1445    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1446    MAV_CMD_NAV_WAYPOINT = 16,
1447    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1448    MAV_CMD_NAV_LOITER_UNLIM = 17,
1449    #[doc = "Loiter around this waypoint for X turns"]
1450    MAV_CMD_NAV_LOITER_TURNS = 18,
1451    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1452    MAV_CMD_NAV_LOITER_TIME = 19,
1453    #[doc = "Return to launch location"]
1454    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1455    #[doc = "Land at location."]
1456    MAV_CMD_NAV_LAND = 21,
1457    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1458    MAV_CMD_NAV_TAKEOFF = 22,
1459    #[doc = "Land at local position (local frame only)"]
1460    MAV_CMD_NAV_LAND_LOCAL = 23,
1461    #[doc = "Takeoff from local position (local frame only)"]
1462    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1463    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1464    MAV_CMD_NAV_FOLLOW = 25,
1465    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1466    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1467    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1468    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1469    #[doc = "Begin following a target"]
1470    MAV_CMD_DO_FOLLOW = 32,
1471    #[doc = "Reposition the MAV after a follow target command has been sent"]
1472    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1473    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1474    MAV_CMD_DO_ORBIT = 34,
1475    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1476    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1477    MAV_CMD_NAV_ROI = 80,
1478    #[doc = "Control autonomous path planning on the MAV."]
1479    MAV_CMD_NAV_PATHPLANNING = 81,
1480    #[doc = "Navigate to waypoint using a spline path."]
1481    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1482    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1483    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1484    #[doc = "Land using VTOL mode"]
1485    MAV_CMD_NAV_VTOL_LAND = 85,
1486    #[doc = "hand control over to an external controller"]
1487    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1488    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1489    MAV_CMD_NAV_DELAY = 93,
1490    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1491    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1492    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1493    MAV_CMD_NAV_LAST = 95,
1494    #[doc = "Delay mission state machine."]
1495    MAV_CMD_CONDITION_DELAY = 112,
1496    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1497    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1498    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1499    MAV_CMD_CONDITION_DISTANCE = 114,
1500    #[doc = "Reach a certain target angle."]
1501    MAV_CMD_CONDITION_YAW = 115,
1502    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1503    MAV_CMD_CONDITION_LAST = 159,
1504    #[doc = "Set system mode."]
1505    MAV_CMD_DO_SET_MODE = 176,
1506    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1507    MAV_CMD_DO_JUMP = 177,
1508    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1509    MAV_CMD_DO_CHANGE_SPEED = 178,
1510    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1511    MAV_CMD_DO_SET_HOME = 179,
1512    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1513    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1514    MAV_CMD_DO_SET_PARAMETER = 180,
1515    #[doc = "Set a relay to a condition."]
1516    MAV_CMD_DO_SET_RELAY = 181,
1517    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1518    MAV_CMD_DO_REPEAT_RELAY = 182,
1519    #[doc = "Set a servo to a desired PWM value."]
1520    MAV_CMD_DO_SET_SERVO = 183,
1521    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1522    MAV_CMD_DO_REPEAT_SERVO = 184,
1523    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1524    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1525    #[doc = "Change altitude set point."]
1526    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1527    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1528    MAV_CMD_DO_SET_ACTUATOR = 187,
1529    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1530    MAV_CMD_DO_RETURN_PATH_START = 188,
1531    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1532    MAV_CMD_DO_LAND_START = 189,
1533    #[doc = "Mission command to perform a landing from a rally point."]
1534    MAV_CMD_DO_RALLY_LAND = 190,
1535    #[doc = "Mission command to safely abort an autonomous landing."]
1536    MAV_CMD_DO_GO_AROUND = 191,
1537    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1538    MAV_CMD_DO_REPOSITION = 192,
1539    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1540    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1541    #[doc = "Set moving direction to forward or reverse."]
1542    MAV_CMD_DO_SET_REVERSE = 194,
1543    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1544    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1545    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1546    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1547    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1548    MAV_CMD_DO_SET_ROI_NONE = 197,
1549    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1550    MAV_CMD_DO_SET_ROI_SYSID = 198,
1551    #[doc = "Control onboard camera system."]
1552    MAV_CMD_DO_CONTROL_VIDEO = 200,
1553    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1554    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1555    MAV_CMD_DO_SET_ROI = 201,
1556    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1557    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1558    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1559    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1560    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1561    #[doc = "Mission command to configure a camera or antenna mount"]
1562    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1563    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1564    #[doc = "Mission command to control a camera or antenna mount"]
1565    MAV_CMD_DO_MOUNT_CONTROL = 205,
1566    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1567    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1568    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1569    MAV_CMD_DO_FENCE_ENABLE = 207,
1570    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1571    MAV_CMD_DO_PARACHUTE = 208,
1572    #[doc = "Command to perform motor test."]
1573    MAV_CMD_DO_MOTOR_TEST = 209,
1574    #[doc = "Change to/from inverted flight."]
1575    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1576    #[doc = "Mission command to operate a gripper."]
1577    MAV_CMD_DO_GRIPPER = 211,
1578    #[doc = "Enable/disable autotune."]
1579    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1580    #[doc = "Sets a desired vehicle turn angle and speed change."]
1581    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1582    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1583    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1584    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1585    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1586    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1587    #[doc = "set id of master controller"]
1588    MAV_CMD_DO_GUIDED_MASTER = 221,
1589    #[doc = "Set limits for external control"]
1590    MAV_CMD_DO_GUIDED_LIMITS = 222,
1591    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1592    MAV_CMD_DO_ENGINE_CONTROL = 223,
1593    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1594    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1595    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1596    MAV_CMD_DO_LAST = 240,
1597    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1598    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1599    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1600    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1601    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1602    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1603    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1604    MAV_CMD_PREFLIGHT_STORAGE = 245,
1605    #[doc = "Request the reboot or shutdown of system components."]
1606    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1607    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1608    MAV_CMD_OVERRIDE_GOTO = 252,
1609    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1610    MAV_CMD_OBLIQUE_SURVEY = 260,
1611    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1612    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1613    #[doc = "start running a mission"]
1614    MAV_CMD_MISSION_START = 300,
1615    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1616    MAV_CMD_ACTUATOR_TEST = 310,
1617    #[doc = "Actuator configuration command."]
1618    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1619    #[doc = "Arms / Disarms a component"]
1620    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1621    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1622    MAV_CMD_RUN_PREARM_CHECKS = 401,
1623    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1624    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1625    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1626    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1627    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1628    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1629    MAV_CMD_GET_HOME_POSITION = 410,
1630    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1631    MAV_CMD_INJECT_FAILURE = 420,
1632    #[doc = "Starts receiver pairing."]
1633    MAV_CMD_START_RX_PAIR = 500,
1634    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1635    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1636    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1637    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1638    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1639    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1640    MAV_CMD_REQUEST_MESSAGE = 512,
1641    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1642    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1643    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1644    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1645    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1646    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1647    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1648    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1649    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1650    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1651    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1652    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1653    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1654    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1655    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1656    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1657    MAV_CMD_STORAGE_FORMAT = 526,
1658    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1659    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1660    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1661    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1662    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1663    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1664    #[doc = "Reset all camera settings to Factory Default"]
1665    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1666    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1667    MAV_CMD_SET_CAMERA_MODE = 530,
1668    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1669    MAV_CMD_SET_CAMERA_ZOOM = 531,
1670    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1671    MAV_CMD_SET_CAMERA_FOCUS = 532,
1672    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1673    MAV_CMD_SET_STORAGE_USAGE = 533,
1674    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1675    MAV_CMD_SET_CAMERA_SOURCE = 534,
1676    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1677    MAV_CMD_JUMP_TAG = 600,
1678    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1679    MAV_CMD_DO_JUMP_TAG = 601,
1680    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1681    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1682    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1683    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1684    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1685    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1686    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1687    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1688    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1689    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1690    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1691    #[doc = "Enable or disable on-board camera triggering system."]
1692    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1693    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1694    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1695    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1696    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1697    #[doc = "Stops ongoing tracking."]
1698    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1699    #[doc = "Starts video capture (recording)."]
1700    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1701    #[doc = "Stop the current video capture (recording)."]
1702    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1703    #[doc = "Start video streaming"]
1704    MAV_CMD_VIDEO_START_STREAMING = 2502,
1705    #[doc = "Stop the given video stream"]
1706    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1707    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1708    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1709    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1710    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1711    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1712    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1713    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1714    MAV_CMD_LOGGING_START = 2510,
1715    #[doc = "Request to stop streaming log data over MAVLink"]
1716    MAV_CMD_LOGGING_STOP = 2511,
1717    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1718    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1719    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1720    #[doc = "Create a panorama at the current position"]
1721    MAV_CMD_PANORAMA_CREATE = 2800,
1722    #[doc = "Request VTOL transition"]
1723    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1724    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1725    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1726    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1727    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1728    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1729    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1730    #[doc = "Delay mission state machine until gate has been reached."]
1731    MAV_CMD_CONDITION_GATE = 4501,
1732    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1733    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1734    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1735    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1736    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1737    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1738    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1739    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1740    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1741    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1742    #[doc = "Rally point. You can have multiple rally points defined."]
1743    MAV_CMD_NAV_RALLY_POINT = 5100,
1744    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1745    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1746    #[doc = "Change state of safety switch."]
1747    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1748    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1749    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1750    #[deprecated = "  (Deprecated since 2021-06)"]
1751    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1752    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1753    #[deprecated = "  (Deprecated since 2021-06)"]
1754    #[doc = "Control the payload deployment."]
1755    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1756    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1757    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1758    #[doc = "Command to operate winch."]
1759    MAV_CMD_DO_WINCH = 42600,
1760    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1761    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1762    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1763    MAV_CMD_WAYPOINT_USER_1 = 31000,
1764    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1765    MAV_CMD_WAYPOINT_USER_2 = 31001,
1766    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1767    MAV_CMD_WAYPOINT_USER_3 = 31002,
1768    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1769    MAV_CMD_WAYPOINT_USER_4 = 31003,
1770    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1771    MAV_CMD_WAYPOINT_USER_5 = 31004,
1772    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1773    MAV_CMD_SPATIAL_USER_1 = 31005,
1774    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1775    MAV_CMD_SPATIAL_USER_2 = 31006,
1776    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1777    MAV_CMD_SPATIAL_USER_3 = 31007,
1778    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1779    MAV_CMD_SPATIAL_USER_4 = 31008,
1780    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1781    MAV_CMD_SPATIAL_USER_5 = 31009,
1782    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1783    MAV_CMD_USER_1 = 31010,
1784    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1785    MAV_CMD_USER_2 = 31011,
1786    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1787    MAV_CMD_USER_3 = 31012,
1788    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1789    MAV_CMD_USER_4 = 31013,
1790    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1791    MAV_CMD_USER_5 = 31014,
1792    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1793    MAV_CMD_CAN_FORWARD = 32000,
1794    #[doc = "Mission command to reset Maximum Power Point Tracker (MPPT)"]
1795    MAV_CMD_RESET_MPPT = 40001,
1796    #[doc = "Mission command to perform a power cycle on payload"]
1797    MAV_CMD_PAYLOAD_CONTROL = 40002,
1798}
1799impl MavCmd {
1800    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1801}
1802impl Default for MavCmd {
1803    fn default() -> Self {
1804        Self::DEFAULT
1805    }
1806}
1807#[cfg_attr(feature = "ts", derive(TS))]
1808#[cfg_attr(feature = "ts", ts(export))]
1809#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1811#[cfg_attr(feature = "serde", serde(tag = "type"))]
1812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1813#[repr(u32)]
1814#[doc = "Possible actions an aircraft can take to avoid a collision."]
1815pub enum MavCollisionAction {
1816    #[doc = "Ignore any potential collisions"]
1817    MAV_COLLISION_ACTION_NONE = 0,
1818    #[doc = "Report potential collision"]
1819    MAV_COLLISION_ACTION_REPORT = 1,
1820    #[doc = "Ascend or Descend to avoid threat"]
1821    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1822    #[doc = "Move horizontally to avoid threat"]
1823    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1824    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1825    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1826    #[doc = "Aircraft to fly directly back to its launch point"]
1827    MAV_COLLISION_ACTION_RTL = 5,
1828    #[doc = "Aircraft to stop in place"]
1829    MAV_COLLISION_ACTION_HOVER = 6,
1830}
1831impl MavCollisionAction {
1832    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1833}
1834impl Default for MavCollisionAction {
1835    fn default() -> Self {
1836        Self::DEFAULT
1837    }
1838}
1839#[cfg_attr(feature = "ts", derive(TS))]
1840#[cfg_attr(feature = "ts", ts(export))]
1841#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1843#[cfg_attr(feature = "serde", serde(tag = "type"))]
1844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1845#[repr(u32)]
1846#[doc = "Source of information about this collision."]
1847pub enum MavCollisionSrc {
1848    #[doc = "ID field references ADSB_VEHICLE packets"]
1849    MAV_COLLISION_SRC_ADSB = 0,
1850    #[doc = "ID field references MAVLink SRC ID"]
1851    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1852}
1853impl MavCollisionSrc {
1854    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1855}
1856impl Default for MavCollisionSrc {
1857    fn default() -> Self {
1858        Self::DEFAULT
1859    }
1860}
1861#[cfg_attr(feature = "ts", derive(TS))]
1862#[cfg_attr(feature = "ts", ts(export))]
1863#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1865#[cfg_attr(feature = "serde", serde(tag = "type"))]
1866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1867#[repr(u32)]
1868#[doc = "Aircraft-rated danger from this threat."]
1869pub enum MavCollisionThreatLevel {
1870    #[doc = "Not a threat"]
1871    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1872    #[doc = "Craft is mildly concerned about this threat"]
1873    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1874    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1875    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1876}
1877impl MavCollisionThreatLevel {
1878    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1879}
1880impl Default for MavCollisionThreatLevel {
1881    fn default() -> Self {
1882        Self::DEFAULT
1883    }
1884}
1885#[cfg_attr(feature = "ts", derive(TS))]
1886#[cfg_attr(feature = "ts", ts(export))]
1887#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1889#[cfg_attr(feature = "serde", serde(tag = "type"))]
1890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1891#[repr(u32)]
1892#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1893pub enum MavComponent {
1894    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1895    MAV_COMP_ID_ALL = 0,
1896    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1897    MAV_COMP_ID_AUTOPILOT1 = 1,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER1 = 25,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER2 = 26,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER3 = 27,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER4 = 28,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER5 = 29,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER6 = 30,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER7 = 31,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER8 = 32,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER9 = 33,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER10 = 34,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER11 = 35,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER12 = 36,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER13 = 37,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER14 = 38,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER15 = 39,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER16 = 40,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER17 = 41,
1932    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1933    MAV_COMP_ID_USER18 = 42,
1934    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1935    MAV_COMP_ID_USER19 = 43,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER20 = 44,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER21 = 45,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER22 = 46,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER23 = 47,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER24 = 48,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER25 = 49,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER26 = 50,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER27 = 51,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER28 = 52,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER29 = 53,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER30 = 54,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER31 = 55,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER32 = 56,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER33 = 57,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER34 = 58,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER35 = 59,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER36 = 60,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER37 = 61,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER38 = 62,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER39 = 63,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER40 = 64,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER41 = 65,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER42 = 66,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER43 = 67,
1984    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1985    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER45 = 69,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER46 = 70,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER47 = 71,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER48 = 72,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER49 = 73,
1996    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1997    MAV_COMP_ID_USER50 = 74,
1998    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1999    MAV_COMP_ID_USER51 = 75,
2000    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2001    MAV_COMP_ID_USER52 = 76,
2002    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2003    MAV_COMP_ID_USER53 = 77,
2004    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2005    MAV_COMP_ID_USER54 = 78,
2006    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2007    MAV_COMP_ID_USER55 = 79,
2008    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2009    MAV_COMP_ID_USER56 = 80,
2010    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2011    MAV_COMP_ID_USER57 = 81,
2012    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2013    MAV_COMP_ID_USER58 = 82,
2014    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2015    MAV_COMP_ID_USER59 = 83,
2016    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2017    MAV_COMP_ID_USER60 = 84,
2018    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2019    MAV_COMP_ID_USER61 = 85,
2020    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2021    MAV_COMP_ID_USER62 = 86,
2022    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2023    MAV_COMP_ID_USER63 = 87,
2024    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2025    MAV_COMP_ID_USER64 = 88,
2026    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2027    MAV_COMP_ID_USER65 = 89,
2028    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2029    MAV_COMP_ID_USER66 = 90,
2030    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2031    MAV_COMP_ID_USER67 = 91,
2032    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2033    MAV_COMP_ID_USER68 = 92,
2034    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2035    MAV_COMP_ID_USER69 = 93,
2036    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2037    MAV_COMP_ID_USER70 = 94,
2038    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2039    MAV_COMP_ID_USER71 = 95,
2040    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2041    MAV_COMP_ID_USER72 = 96,
2042    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2043    MAV_COMP_ID_USER73 = 97,
2044    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2045    MAV_COMP_ID_USER74 = 98,
2046    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2047    MAV_COMP_ID_USER75 = 99,
2048    #[doc = "Camera #1."]
2049    MAV_COMP_ID_CAMERA = 100,
2050    #[doc = "Camera #2."]
2051    MAV_COMP_ID_CAMERA2 = 101,
2052    #[doc = "Camera #3."]
2053    MAV_COMP_ID_CAMERA3 = 102,
2054    #[doc = "Camera #4."]
2055    MAV_COMP_ID_CAMERA4 = 103,
2056    #[doc = "Camera #5."]
2057    MAV_COMP_ID_CAMERA5 = 104,
2058    #[doc = "Camera #6."]
2059    MAV_COMP_ID_CAMERA6 = 105,
2060    #[doc = "Servo #1."]
2061    MAV_COMP_ID_SERVO1 = 140,
2062    #[doc = "Servo #2."]
2063    MAV_COMP_ID_SERVO2 = 141,
2064    #[doc = "Servo #3."]
2065    MAV_COMP_ID_SERVO3 = 142,
2066    #[doc = "Servo #4."]
2067    MAV_COMP_ID_SERVO4 = 143,
2068    #[doc = "Servo #5."]
2069    MAV_COMP_ID_SERVO5 = 144,
2070    #[doc = "Servo #6."]
2071    MAV_COMP_ID_SERVO6 = 145,
2072    #[doc = "Servo #7."]
2073    MAV_COMP_ID_SERVO7 = 146,
2074    #[doc = "Servo #8."]
2075    MAV_COMP_ID_SERVO8 = 147,
2076    #[doc = "Servo #9."]
2077    MAV_COMP_ID_SERVO9 = 148,
2078    #[doc = "Servo #10."]
2079    MAV_COMP_ID_SERVO10 = 149,
2080    #[doc = "Servo #11."]
2081    MAV_COMP_ID_SERVO11 = 150,
2082    #[doc = "Servo #12."]
2083    MAV_COMP_ID_SERVO12 = 151,
2084    #[doc = "Servo #13."]
2085    MAV_COMP_ID_SERVO13 = 152,
2086    #[doc = "Servo #14."]
2087    MAV_COMP_ID_SERVO14 = 153,
2088    #[doc = "Gimbal #1."]
2089    MAV_COMP_ID_GIMBAL = 154,
2090    #[doc = "Logging component."]
2091    MAV_COMP_ID_LOG = 155,
2092    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2093    MAV_COMP_ID_ADSB = 156,
2094    #[doc = "On Screen Display (OSD) devices for video links."]
2095    MAV_COMP_ID_OSD = 157,
2096    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2097    MAV_COMP_ID_PERIPHERAL = 158,
2098    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2099    #[doc = "Gimbal ID for QX1."]
2100    MAV_COMP_ID_QX1_GIMBAL = 159,
2101    #[doc = "FLARM collision alert component."]
2102    MAV_COMP_ID_FLARM = 160,
2103    #[doc = "Parachute component."]
2104    MAV_COMP_ID_PARACHUTE = 161,
2105    #[doc = "Winch component."]
2106    MAV_COMP_ID_WINCH = 169,
2107    #[doc = "Gimbal #2."]
2108    MAV_COMP_ID_GIMBAL2 = 171,
2109    #[doc = "Gimbal #3."]
2110    MAV_COMP_ID_GIMBAL3 = 172,
2111    #[doc = "Gimbal #4"]
2112    MAV_COMP_ID_GIMBAL4 = 173,
2113    #[doc = "Gimbal #5."]
2114    MAV_COMP_ID_GIMBAL5 = 174,
2115    #[doc = "Gimbal #6."]
2116    MAV_COMP_ID_GIMBAL6 = 175,
2117    #[doc = "Battery #1."]
2118    MAV_COMP_ID_BATTERY = 180,
2119    #[doc = "Battery #2."]
2120    MAV_COMP_ID_BATTERY2 = 181,
2121    #[doc = "CAN over MAVLink client."]
2122    MAV_COMP_ID_MAVCAN = 189,
2123    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2124    MAV_COMP_ID_MISSIONPLANNER = 190,
2125    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2126    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2127    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2128    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2129    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2130    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2131    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2132    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2133    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2134    MAV_COMP_ID_PATHPLANNER = 195,
2135    #[doc = "Component that plans a collision free path between two points."]
2136    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2137    #[doc = "Component that provides position estimates using VIO techniques."]
2138    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2139    #[doc = "Component that manages pairing of vehicle and GCS."]
2140    MAV_COMP_ID_PAIRING_MANAGER = 198,
2141    #[doc = "Inertial Measurement Unit (IMU) #1."]
2142    MAV_COMP_ID_IMU = 200,
2143    #[doc = "Inertial Measurement Unit (IMU) #2."]
2144    MAV_COMP_ID_IMU_2 = 201,
2145    #[doc = "Inertial Measurement Unit (IMU) #3."]
2146    MAV_COMP_ID_IMU_3 = 202,
2147    #[doc = "GPS #1."]
2148    MAV_COMP_ID_GPS = 220,
2149    #[doc = "GPS #2."]
2150    MAV_COMP_ID_GPS2 = 221,
2151    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2152    MAV_COMP_ID_ODID_TXRX_1 = 236,
2153    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2154    MAV_COMP_ID_ODID_TXRX_2 = 237,
2155    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2156    MAV_COMP_ID_ODID_TXRX_3 = 238,
2157    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2158    MAV_COMP_ID_UDP_BRIDGE = 240,
2159    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2160    MAV_COMP_ID_UART_BRIDGE = 241,
2161    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2162    MAV_COMP_ID_TUNNEL_NODE = 242,
2163    #[doc = "Illuminator"]
2164    MAV_COMP_ID_ILLUMINATOR = 243,
2165    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2166    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2167    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2168}
2169impl MavComponent {
2170    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2171}
2172impl Default for MavComponent {
2173    fn default() -> Self {
2174        Self::DEFAULT
2175    }
2176}
2177#[cfg_attr(feature = "ts", derive(TS))]
2178#[cfg_attr(feature = "ts", ts(export))]
2179#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2180#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2181#[cfg_attr(feature = "serde", serde(tag = "type"))]
2182#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2183#[repr(u32)]
2184#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2185#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2186pub enum MavDataStream {
2187    #[doc = "Enable all data streams"]
2188    MAV_DATA_STREAM_ALL = 0,
2189    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2190    MAV_DATA_STREAM_RAW_SENSORS = 1,
2191    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2192    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2193    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2194    MAV_DATA_STREAM_RC_CHANNELS = 3,
2195    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2196    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2197    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2198    MAV_DATA_STREAM_POSITION = 6,
2199    #[doc = "Dependent on the autopilot"]
2200    MAV_DATA_STREAM_EXTRA1 = 10,
2201    #[doc = "Dependent on the autopilot"]
2202    MAV_DATA_STREAM_EXTRA2 = 11,
2203    #[doc = "Dependent on the autopilot"]
2204    MAV_DATA_STREAM_EXTRA3 = 12,
2205}
2206impl MavDataStream {
2207    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2208}
2209impl Default for MavDataStream {
2210    fn default() -> Self {
2211        Self::DEFAULT
2212    }
2213}
2214#[cfg_attr(feature = "ts", derive(TS))]
2215#[cfg_attr(feature = "ts", ts(export))]
2216#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2217#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2218#[cfg_attr(feature = "serde", serde(tag = "type"))]
2219#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2220#[repr(u32)]
2221#[doc = "Enumeration of distance sensor types"]
2222pub enum MavDistanceSensor {
2223    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2224    MAV_DISTANCE_SENSOR_LASER = 0,
2225    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2226    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2227    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2228    MAV_DISTANCE_SENSOR_INFRARED = 2,
2229    #[doc = "Radar type, e.g. uLanding units"]
2230    MAV_DISTANCE_SENSOR_RADAR = 3,
2231    #[doc = "Broken or unknown type, e.g. analog units"]
2232    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2233}
2234impl MavDistanceSensor {
2235    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2236}
2237impl Default for MavDistanceSensor {
2238    fn default() -> Self {
2239        Self::DEFAULT
2240    }
2241}
2242#[cfg_attr(feature = "ts", derive(TS))]
2243#[cfg_attr(feature = "ts", ts(export))]
2244#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2246#[cfg_attr(feature = "serde", serde(tag = "type"))]
2247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2248#[repr(u32)]
2249#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2250pub enum MavDoRepositionFlags {
2251    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2252    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2253}
2254impl MavDoRepositionFlags {
2255    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2256}
2257impl Default for MavDoRepositionFlags {
2258    fn default() -> Self {
2259        Self::DEFAULT
2260    }
2261}
2262#[cfg_attr(feature = "ts", derive(TS))]
2263#[cfg_attr(feature = "ts", ts(export))]
2264#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2266#[cfg_attr(feature = "serde", serde(tag = "type"))]
2267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2268#[repr(u32)]
2269#[doc = "Enumeration of estimator types"]
2270pub enum MavEstimatorType {
2271    #[doc = "Unknown type of the estimator."]
2272    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2273    #[doc = "This is a naive estimator without any real covariance feedback."]
2274    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2275    #[doc = "Computer vision based estimate. Might be up to scale."]
2276    MAV_ESTIMATOR_TYPE_VISION = 2,
2277    #[doc = "Visual-inertial estimate."]
2278    MAV_ESTIMATOR_TYPE_VIO = 3,
2279    #[doc = "Plain GPS estimate."]
2280    MAV_ESTIMATOR_TYPE_GPS = 4,
2281    #[doc = "Estimator integrating GPS and inertial sensing."]
2282    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2283    #[doc = "Estimate from external motion capturing system."]
2284    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2285    #[doc = "Estimator based on lidar sensor input."]
2286    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2287    #[doc = "Estimator on autopilot."]
2288    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2289}
2290impl MavEstimatorType {
2291    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2292}
2293impl Default for MavEstimatorType {
2294    fn default() -> Self {
2295        Self::DEFAULT
2296    }
2297}
2298#[cfg_attr(feature = "ts", derive(TS))]
2299#[cfg_attr(feature = "ts", ts(export))]
2300#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2302#[cfg_attr(feature = "serde", serde(tag = "type"))]
2303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2304#[repr(u32)]
2305#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2306pub enum MavEventCurrentSequenceFlags {
2307    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2308    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2309}
2310impl MavEventCurrentSequenceFlags {
2311    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2312}
2313impl Default for MavEventCurrentSequenceFlags {
2314    fn default() -> Self {
2315        Self::DEFAULT
2316    }
2317}
2318#[cfg_attr(feature = "ts", derive(TS))]
2319#[cfg_attr(feature = "ts", ts(export))]
2320#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2322#[cfg_attr(feature = "serde", serde(tag = "type"))]
2323#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2324#[repr(u32)]
2325#[doc = "Reason for an event error response."]
2326pub enum MavEventErrorReason {
2327    #[doc = "The requested event is not available (anymore)."]
2328    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2329}
2330impl MavEventErrorReason {
2331    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2332}
2333impl Default for MavEventErrorReason {
2334    fn default() -> Self {
2335        Self::DEFAULT
2336    }
2337}
2338#[cfg_attr(feature = "ts", derive(TS))]
2339#[cfg_attr(feature = "ts", ts(export))]
2340#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2342#[cfg_attr(feature = "serde", serde(tag = "type"))]
2343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2344#[repr(u32)]
2345#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2346pub enum MavFrame {
2347    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2348    MAV_FRAME_GLOBAL = 0,
2349    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2350    MAV_FRAME_LOCAL_NED = 1,
2351    #[doc = "NOT a coordinate frame, indicates a mission command."]
2352    MAV_FRAME_MISSION = 2,
2353    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2354    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2355    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2356    MAV_FRAME_LOCAL_ENU = 4,
2357    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2358    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2359    MAV_FRAME_GLOBAL_INT = 5,
2360    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2361    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2362    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2363    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2364    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2365    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2366    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2367    MAV_FRAME_BODY_NED = 8,
2368    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2369    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2370    MAV_FRAME_BODY_OFFSET_NED = 9,
2371    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2372    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2373    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2374    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2375    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2376    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2377    MAV_FRAME_BODY_FRD = 12,
2378    #[deprecated = "  (Deprecated since 2019-04)"]
2379    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2380    MAV_FRAME_RESERVED_13 = 13,
2381    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2382    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2383    MAV_FRAME_RESERVED_14 = 14,
2384    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2385    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2386    MAV_FRAME_RESERVED_15 = 15,
2387    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2388    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2389    MAV_FRAME_RESERVED_16 = 16,
2390    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2391    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2392    MAV_FRAME_RESERVED_17 = 17,
2393    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2394    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2395    MAV_FRAME_RESERVED_18 = 18,
2396    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2397    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2398    MAV_FRAME_RESERVED_19 = 19,
2399    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2400    MAV_FRAME_LOCAL_FRD = 20,
2401    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2402    MAV_FRAME_LOCAL_FLU = 21,
2403}
2404impl MavFrame {
2405    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2406}
2407impl Default for MavFrame {
2408    fn default() -> Self {
2409        Self::DEFAULT
2410    }
2411}
2412#[cfg_attr(feature = "ts", derive(TS))]
2413#[cfg_attr(feature = "ts", ts(export))]
2414#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2415#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2416#[cfg_attr(feature = "serde", serde(tag = "type"))]
2417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2418#[repr(u32)]
2419#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2420pub enum MavFtpErr {
2421    #[doc = "None: No error"]
2422    MAV_FTP_ERR_NONE = 0,
2423    #[doc = "Fail: Unknown failure"]
2424    MAV_FTP_ERR_FAIL = 1,
2425    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2426    MAV_FTP_ERR_FAILERRNO = 2,
2427    #[doc = "InvalidDataSize: Payload size is invalid"]
2428    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2429    #[doc = "InvalidSession: Session is not currently open"]
2430    MAV_FTP_ERR_INVALIDSESSION = 4,
2431    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2432    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2433    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2434    MAV_FTP_ERR_EOF = 6,
2435    #[doc = "UnknownCommand: Unknown command / opcode"]
2436    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2437    #[doc = "FileExists: File/directory already exists"]
2438    MAV_FTP_ERR_FILEEXISTS = 8,
2439    #[doc = "FileProtected: File/directory is write protected"]
2440    MAV_FTP_ERR_FILEPROTECTED = 9,
2441    #[doc = "FileNotFound: File/directory not found"]
2442    MAV_FTP_ERR_FILENOTFOUND = 10,
2443}
2444impl MavFtpErr {
2445    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2446}
2447impl Default for MavFtpErr {
2448    fn default() -> Self {
2449        Self::DEFAULT
2450    }
2451}
2452#[cfg_attr(feature = "ts", derive(TS))]
2453#[cfg_attr(feature = "ts", ts(export))]
2454#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2455#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2456#[cfg_attr(feature = "serde", serde(tag = "type"))]
2457#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2458#[repr(u32)]
2459#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2460pub enum MavFtpOpcode {
2461    #[doc = "None. Ignored, always ACKed"]
2462    MAV_FTP_OPCODE_NONE = 0,
2463    #[doc = "TerminateSession: Terminates open Read session"]
2464    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2465    #[doc = "ResetSessions: Terminates all open read sessions"]
2466    MAV_FTP_OPCODE_RESETSESSION = 2,
2467    #[doc = "ListDirectory. List files and directories in path from offset"]
2468    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2469    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2470    MAV_FTP_OPCODE_OPENFILERO = 4,
2471    #[doc = "ReadFile: Reads size bytes from offset in session"]
2472    MAV_FTP_OPCODE_READFILE = 5,
2473    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2474    MAV_FTP_OPCODE_CREATEFILE = 6,
2475    #[doc = "WriteFile: Writes size bytes to offset in session"]
2476    MAV_FTP_OPCODE_WRITEFILE = 7,
2477    #[doc = "RemoveFile: Remove file at path"]
2478    MAV_FTP_OPCODE_REMOVEFILE = 8,
2479    #[doc = "CreateDirectory: Creates directory at path"]
2480    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2481    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2482    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2483    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2484    MAV_FTP_OPCODE_OPENFILEWO = 11,
2485    #[doc = "TruncateFile: Truncate file at path to offset length"]
2486    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2487    #[doc = "Rename: Rename path1 to path2"]
2488    MAV_FTP_OPCODE_RENAME = 13,
2489    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2490    MAV_FTP_OPCODE_CALCFILECRC = 14,
2491    #[doc = "BurstReadFile: Burst download session file"]
2492    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2493    #[doc = "ACK: ACK response"]
2494    MAV_FTP_OPCODE_ACK = 128,
2495    #[doc = "NAK: NAK response"]
2496    MAV_FTP_OPCODE_NAK = 129,
2497}
2498impl MavFtpOpcode {
2499    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2500}
2501impl Default for MavFtpOpcode {
2502    fn default() -> Self {
2503        Self::DEFAULT
2504    }
2505}
2506#[cfg_attr(feature = "ts", derive(TS))]
2507#[cfg_attr(feature = "ts", ts(export))]
2508#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2509#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2510#[cfg_attr(feature = "serde", serde(tag = "type"))]
2511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2512#[repr(u32)]
2513#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2514pub enum MavFuelType {
2515    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2516    MAV_FUEL_TYPE_UNKNOWN = 0,
2517    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2518    MAV_FUEL_TYPE_LIQUID = 1,
2519    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2520    MAV_FUEL_TYPE_GAS = 2,
2521}
2522impl MavFuelType {
2523    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2524}
2525impl Default for MavFuelType {
2526    fn default() -> Self {
2527        Self::DEFAULT
2528    }
2529}
2530bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2531impl MavGeneratorStatusFlag {
2532    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2533}
2534impl Default for MavGeneratorStatusFlag {
2535    fn default() -> Self {
2536        Self::DEFAULT
2537    }
2538}
2539#[cfg_attr(feature = "ts", derive(TS))]
2540#[cfg_attr(feature = "ts", ts(export))]
2541#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2542#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2543#[cfg_attr(feature = "serde", serde(tag = "type"))]
2544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2545#[repr(u32)]
2546#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2547pub enum MavGoto {
2548    #[doc = "Hold at the current position."]
2549    MAV_GOTO_DO_HOLD = 0,
2550    #[doc = "Continue with the next item in mission execution."]
2551    MAV_GOTO_DO_CONTINUE = 1,
2552    #[doc = "Hold at the current position of the system"]
2553    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2554    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2555    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2556}
2557impl MavGoto {
2558    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2559}
2560impl Default for MavGoto {
2561    fn default() -> Self {
2562        Self::DEFAULT
2563    }
2564}
2565#[cfg_attr(feature = "ts", derive(TS))]
2566#[cfg_attr(feature = "ts", ts(export))]
2567#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2568#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2569#[cfg_attr(feature = "serde", serde(tag = "type"))]
2570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2571#[repr(u32)]
2572#[doc = "Enumeration of landed detector states"]
2573pub enum MavLandedState {
2574    #[doc = "MAV landed state is unknown"]
2575    MAV_LANDED_STATE_UNDEFINED = 0,
2576    #[doc = "MAV is landed (on ground)"]
2577    MAV_LANDED_STATE_ON_GROUND = 1,
2578    #[doc = "MAV is in air"]
2579    MAV_LANDED_STATE_IN_AIR = 2,
2580    #[doc = "MAV currently taking off"]
2581    MAV_LANDED_STATE_TAKEOFF = 3,
2582    #[doc = "MAV currently landing"]
2583    MAV_LANDED_STATE_LANDING = 4,
2584}
2585impl MavLandedState {
2586    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2587}
2588impl Default for MavLandedState {
2589    fn default() -> Self {
2590        Self::DEFAULT
2591    }
2592}
2593#[cfg_attr(feature = "ts", derive(TS))]
2594#[cfg_attr(feature = "ts", ts(export))]
2595#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2597#[cfg_attr(feature = "serde", serde(tag = "type"))]
2598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2599#[repr(u32)]
2600#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2601pub enum MavMissionResult {
2602    #[doc = "mission accepted OK"]
2603    MAV_MISSION_ACCEPTED = 0,
2604    #[doc = "Generic error / not accepting mission commands at all right now."]
2605    MAV_MISSION_ERROR = 1,
2606    #[doc = "Coordinate frame is not supported."]
2607    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2608    #[doc = "Command is not supported."]
2609    MAV_MISSION_UNSUPPORTED = 3,
2610    #[doc = "Mission items exceed storage space."]
2611    MAV_MISSION_NO_SPACE = 4,
2612    #[doc = "One of the parameters has an invalid value."]
2613    MAV_MISSION_INVALID = 5,
2614    #[doc = "param1 has an invalid value."]
2615    MAV_MISSION_INVALID_PARAM1 = 6,
2616    #[doc = "param2 has an invalid value."]
2617    MAV_MISSION_INVALID_PARAM2 = 7,
2618    #[doc = "param3 has an invalid value."]
2619    MAV_MISSION_INVALID_PARAM3 = 8,
2620    #[doc = "param4 has an invalid value."]
2621    MAV_MISSION_INVALID_PARAM4 = 9,
2622    #[doc = "x / param5 has an invalid value."]
2623    MAV_MISSION_INVALID_PARAM5_X = 10,
2624    #[doc = "y / param6 has an invalid value."]
2625    MAV_MISSION_INVALID_PARAM6_Y = 11,
2626    #[doc = "z / param7 has an invalid value."]
2627    MAV_MISSION_INVALID_PARAM7 = 12,
2628    #[doc = "Mission item received out of sequence"]
2629    MAV_MISSION_INVALID_SEQUENCE = 13,
2630    #[doc = "Not accepting any mission commands from this communication partner."]
2631    MAV_MISSION_DENIED = 14,
2632    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2633    MAV_MISSION_OPERATION_CANCELLED = 15,
2634}
2635impl MavMissionResult {
2636    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2637}
2638impl Default for MavMissionResult {
2639    fn default() -> Self {
2640        Self::DEFAULT
2641    }
2642}
2643#[cfg_attr(feature = "ts", derive(TS))]
2644#[cfg_attr(feature = "ts", ts(export))]
2645#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2647#[cfg_attr(feature = "serde", serde(tag = "type"))]
2648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2649#[repr(u32)]
2650#[doc = "Type of mission items being requested/sent in mission protocol."]
2651pub enum MavMissionType {
2652    #[doc = "Items are mission commands for main mission."]
2653    MAV_MISSION_TYPE_MISSION = 0,
2654    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2655    MAV_MISSION_TYPE_FENCE = 1,
2656    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2657    MAV_MISSION_TYPE_RALLY = 2,
2658    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2659    MAV_MISSION_TYPE_ALL = 255,
2660}
2661impl MavMissionType {
2662    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2663}
2664impl Default for MavMissionType {
2665    fn default() -> Self {
2666        Self::DEFAULT
2667    }
2668}
2669#[cfg_attr(feature = "ts", derive(TS))]
2670#[cfg_attr(feature = "ts", ts(export))]
2671#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2673#[cfg_attr(feature = "serde", serde(tag = "type"))]
2674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2675#[repr(u32)]
2676#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2677pub enum MavMode {
2678    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2679    MAV_MODE_PREFLIGHT = 0,
2680    #[doc = "System is allowed to be active, under assisted RC control."]
2681    MAV_MODE_STABILIZE_DISARMED = 80,
2682    #[doc = "System is allowed to be active, under assisted RC control."]
2683    MAV_MODE_STABILIZE_ARMED = 208,
2684    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2685    MAV_MODE_MANUAL_DISARMED = 64,
2686    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2687    MAV_MODE_MANUAL_ARMED = 192,
2688    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2689    MAV_MODE_GUIDED_DISARMED = 88,
2690    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2691    MAV_MODE_GUIDED_ARMED = 216,
2692    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2693    MAV_MODE_AUTO_DISARMED = 92,
2694    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2695    MAV_MODE_AUTO_ARMED = 220,
2696    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2697    MAV_MODE_TEST_DISARMED = 66,
2698    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2699    MAV_MODE_TEST_ARMED = 194,
2700}
2701impl MavMode {
2702    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2703}
2704impl Default for MavMode {
2705    fn default() -> Self {
2706        Self::DEFAULT
2707    }
2708}
2709bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2710impl MavModeFlag {
2711    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2712}
2713impl Default for MavModeFlag {
2714    fn default() -> Self {
2715        Self::DEFAULT
2716    }
2717}
2718#[cfg_attr(feature = "ts", derive(TS))]
2719#[cfg_attr(feature = "ts", ts(export))]
2720#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2721#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2722#[cfg_attr(feature = "serde", serde(tag = "type"))]
2723#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2724#[repr(u32)]
2725#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2726pub enum MavModeFlagDecodePosition {
2727    #[doc = "First bit:  10000000"]
2728    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2729    #[doc = "Second bit: 01000000"]
2730    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2731    #[doc = "Third bit:  00100000"]
2732    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2733    #[doc = "Fourth bit: 00010000"]
2734    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2735    #[doc = "Fifth bit:  00001000"]
2736    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2737    #[doc = "Sixth bit:   00000100"]
2738    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2739    #[doc = "Seventh bit: 00000010"]
2740    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2741    #[doc = "Eighth bit: 00000001"]
2742    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2743}
2744impl MavModeFlagDecodePosition {
2745    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2746}
2747impl Default for MavModeFlagDecodePosition {
2748    fn default() -> Self {
2749        Self::DEFAULT
2750    }
2751}
2752bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2753impl MavModeProperty {
2754    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2755}
2756impl Default for MavModeProperty {
2757    fn default() -> Self {
2758        Self::DEFAULT
2759    }
2760}
2761#[cfg_attr(feature = "ts", derive(TS))]
2762#[cfg_attr(feature = "ts", ts(export))]
2763#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2764#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2765#[cfg_attr(feature = "serde", serde(tag = "type"))]
2766#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2767#[repr(u32)]
2768#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2769#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2770pub enum MavMountMode {
2771    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2772    MAV_MOUNT_MODE_RETRACT = 0,
2773    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2774    MAV_MOUNT_MODE_NEUTRAL = 1,
2775    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2776    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2777    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2778    MAV_MOUNT_MODE_RC_TARGETING = 3,
2779    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2780    MAV_MOUNT_MODE_GPS_POINT = 4,
2781    #[doc = "Gimbal tracks system with specified system ID"]
2782    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2783    #[doc = "Gimbal tracks home position"]
2784    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2785}
2786impl MavMountMode {
2787    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2788}
2789impl Default for MavMountMode {
2790    fn default() -> Self {
2791        Self::DEFAULT
2792    }
2793}
2794#[cfg_attr(feature = "ts", derive(TS))]
2795#[cfg_attr(feature = "ts", ts(export))]
2796#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2798#[cfg_attr(feature = "serde", serde(tag = "type"))]
2799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2800#[repr(u32)]
2801pub enum MavOdidArmStatus {
2802    #[doc = "Passing arming checks."]
2803    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2804    #[doc = "Generic arming failure, see error string for details."]
2805    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2806}
2807impl MavOdidArmStatus {
2808    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2809}
2810impl Default for MavOdidArmStatus {
2811    fn default() -> Self {
2812        Self::DEFAULT
2813    }
2814}
2815#[cfg_attr(feature = "ts", derive(TS))]
2816#[cfg_attr(feature = "ts", ts(export))]
2817#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2819#[cfg_attr(feature = "serde", serde(tag = "type"))]
2820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2821#[repr(u32)]
2822pub enum MavOdidAuthType {
2823    #[doc = "No authentication type is specified."]
2824    MAV_ODID_AUTH_TYPE_NONE = 0,
2825    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2826    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2827    #[doc = "Signature for the Operator ID."]
2828    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2829    #[doc = "Signature for the entire message set."]
2830    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2831    #[doc = "Authentication is provided by Network Remote ID."]
2832    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2833    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2834    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2835}
2836impl MavOdidAuthType {
2837    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2838}
2839impl Default for MavOdidAuthType {
2840    fn default() -> Self {
2841        Self::DEFAULT
2842    }
2843}
2844#[cfg_attr(feature = "ts", derive(TS))]
2845#[cfg_attr(feature = "ts", ts(export))]
2846#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2848#[cfg_attr(feature = "serde", serde(tag = "type"))]
2849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2850#[repr(u32)]
2851pub enum MavOdidCategoryEu {
2852    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2853    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2854    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2855    MAV_ODID_CATEGORY_EU_OPEN = 1,
2856    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2857    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2858    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2859    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2860}
2861impl MavOdidCategoryEu {
2862    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2863}
2864impl Default for MavOdidCategoryEu {
2865    fn default() -> Self {
2866        Self::DEFAULT
2867    }
2868}
2869#[cfg_attr(feature = "ts", derive(TS))]
2870#[cfg_attr(feature = "ts", ts(export))]
2871#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2873#[cfg_attr(feature = "serde", serde(tag = "type"))]
2874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2875#[repr(u32)]
2876pub enum MavOdidClassEu {
2877    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2878    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2879    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2880    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2881    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2882    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2883    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2884    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2885    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2886    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2887    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2888    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2889    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2890    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2891    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2892    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2893}
2894impl MavOdidClassEu {
2895    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2896}
2897impl Default for MavOdidClassEu {
2898    fn default() -> Self {
2899        Self::DEFAULT
2900    }
2901}
2902#[cfg_attr(feature = "ts", derive(TS))]
2903#[cfg_attr(feature = "ts", ts(export))]
2904#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2905#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2906#[cfg_attr(feature = "serde", serde(tag = "type"))]
2907#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2908#[repr(u32)]
2909pub enum MavOdidClassificationType {
2910    #[doc = "The classification type for the UA is undeclared."]
2911    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2912    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2913    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2914}
2915impl MavOdidClassificationType {
2916    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2917}
2918impl Default for MavOdidClassificationType {
2919    fn default() -> Self {
2920        Self::DEFAULT
2921    }
2922}
2923#[cfg_attr(feature = "ts", derive(TS))]
2924#[cfg_attr(feature = "ts", ts(export))]
2925#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2926#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2927#[cfg_attr(feature = "serde", serde(tag = "type"))]
2928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2929#[repr(u32)]
2930pub enum MavOdidDescType {
2931    #[doc = "Optional free-form text description of the purpose of the flight."]
2932    MAV_ODID_DESC_TYPE_TEXT = 0,
2933    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2934    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2935    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2936    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2937}
2938impl MavOdidDescType {
2939    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2940}
2941impl Default for MavOdidDescType {
2942    fn default() -> Self {
2943        Self::DEFAULT
2944    }
2945}
2946#[cfg_attr(feature = "ts", derive(TS))]
2947#[cfg_attr(feature = "ts", ts(export))]
2948#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2950#[cfg_attr(feature = "serde", serde(tag = "type"))]
2951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2952#[repr(u32)]
2953pub enum MavOdidHeightRef {
2954    #[doc = "The height field is relative to the take-off location."]
2955    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2956    #[doc = "The height field is relative to ground."]
2957    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2958}
2959impl MavOdidHeightRef {
2960    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2961}
2962impl Default for MavOdidHeightRef {
2963    fn default() -> Self {
2964        Self::DEFAULT
2965    }
2966}
2967#[cfg_attr(feature = "ts", derive(TS))]
2968#[cfg_attr(feature = "ts", ts(export))]
2969#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2971#[cfg_attr(feature = "serde", serde(tag = "type"))]
2972#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2973#[repr(u32)]
2974pub enum MavOdidHorAcc {
2975    #[doc = "The horizontal accuracy is unknown."]
2976    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2977    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2978    MAV_ODID_HOR_ACC_10NM = 1,
2979    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2980    MAV_ODID_HOR_ACC_4NM = 2,
2981    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2982    MAV_ODID_HOR_ACC_2NM = 3,
2983    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2984    MAV_ODID_HOR_ACC_1NM = 4,
2985    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2986    MAV_ODID_HOR_ACC_0_5NM = 5,
2987    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2988    MAV_ODID_HOR_ACC_0_3NM = 6,
2989    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2990    MAV_ODID_HOR_ACC_0_1NM = 7,
2991    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2992    MAV_ODID_HOR_ACC_0_05NM = 8,
2993    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2994    MAV_ODID_HOR_ACC_30_METER = 9,
2995    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2996    MAV_ODID_HOR_ACC_10_METER = 10,
2997    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2998    MAV_ODID_HOR_ACC_3_METER = 11,
2999    #[doc = "The horizontal accuracy is smaller than 1 meter."]
3000    MAV_ODID_HOR_ACC_1_METER = 12,
3001}
3002impl MavOdidHorAcc {
3003    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
3004}
3005impl Default for MavOdidHorAcc {
3006    fn default() -> Self {
3007        Self::DEFAULT
3008    }
3009}
3010#[cfg_attr(feature = "ts", derive(TS))]
3011#[cfg_attr(feature = "ts", ts(export))]
3012#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3013#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3014#[cfg_attr(feature = "serde", serde(tag = "type"))]
3015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3016#[repr(u32)]
3017pub enum MavOdidIdType {
3018    #[doc = "No type defined."]
3019    MAV_ODID_ID_TYPE_NONE = 0,
3020    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
3021    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
3022    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
3023    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
3024    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
3025    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
3026    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
3027    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
3028}
3029impl MavOdidIdType {
3030    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
3031}
3032impl Default for MavOdidIdType {
3033    fn default() -> Self {
3034        Self::DEFAULT
3035    }
3036}
3037#[cfg_attr(feature = "ts", derive(TS))]
3038#[cfg_attr(feature = "ts", ts(export))]
3039#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3041#[cfg_attr(feature = "serde", serde(tag = "type"))]
3042#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3043#[repr(u32)]
3044pub enum MavOdidOperatorIdType {
3045    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
3046    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
3047}
3048impl MavOdidOperatorIdType {
3049    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3050}
3051impl Default for MavOdidOperatorIdType {
3052    fn default() -> Self {
3053        Self::DEFAULT
3054    }
3055}
3056#[cfg_attr(feature = "ts", derive(TS))]
3057#[cfg_attr(feature = "ts", ts(export))]
3058#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3060#[cfg_attr(feature = "serde", serde(tag = "type"))]
3061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3062#[repr(u32)]
3063pub enum MavOdidOperatorLocationType {
3064    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3065    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3066    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3067    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3068    #[doc = "The location/altitude of the operator are fixed values."]
3069    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3070}
3071impl MavOdidOperatorLocationType {
3072    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3073}
3074impl Default for MavOdidOperatorLocationType {
3075    fn default() -> Self {
3076        Self::DEFAULT
3077    }
3078}
3079#[cfg_attr(feature = "ts", derive(TS))]
3080#[cfg_attr(feature = "ts", ts(export))]
3081#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3083#[cfg_attr(feature = "serde", serde(tag = "type"))]
3084#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3085#[repr(u32)]
3086pub enum MavOdidSpeedAcc {
3087    #[doc = "The speed accuracy is unknown."]
3088    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3089    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3090    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3091    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3092    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3093    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3094    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3095    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3096    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3097}
3098impl MavOdidSpeedAcc {
3099    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3100}
3101impl Default for MavOdidSpeedAcc {
3102    fn default() -> Self {
3103        Self::DEFAULT
3104    }
3105}
3106#[cfg_attr(feature = "ts", derive(TS))]
3107#[cfg_attr(feature = "ts", ts(export))]
3108#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3109#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3110#[cfg_attr(feature = "serde", serde(tag = "type"))]
3111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3112#[repr(u32)]
3113pub enum MavOdidStatus {
3114    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3115    MAV_ODID_STATUS_UNDECLARED = 0,
3116    #[doc = "The UA is on the ground."]
3117    MAV_ODID_STATUS_GROUND = 1,
3118    #[doc = "The UA is in the air."]
3119    MAV_ODID_STATUS_AIRBORNE = 2,
3120    #[doc = "The UA is having an emergency."]
3121    MAV_ODID_STATUS_EMERGENCY = 3,
3122    #[doc = "The remote ID system is failing or unreliable in some way."]
3123    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3124}
3125impl MavOdidStatus {
3126    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3127}
3128impl Default for MavOdidStatus {
3129    fn default() -> Self {
3130        Self::DEFAULT
3131    }
3132}
3133#[cfg_attr(feature = "ts", derive(TS))]
3134#[cfg_attr(feature = "ts", ts(export))]
3135#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3137#[cfg_attr(feature = "serde", serde(tag = "type"))]
3138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3139#[repr(u32)]
3140pub enum MavOdidTimeAcc {
3141    #[doc = "The timestamp accuracy is unknown."]
3142    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3143    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3144    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3145    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3146    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3147    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3148    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3149    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3150    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3151    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3152    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3153    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3154    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3155    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3156    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3157    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3158    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3159    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3160    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3161    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3162    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3163    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3164    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3165    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3166    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3167    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3168    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3169    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3170    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3171    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3172    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3173}
3174impl MavOdidTimeAcc {
3175    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3176}
3177impl Default for MavOdidTimeAcc {
3178    fn default() -> Self {
3179        Self::DEFAULT
3180    }
3181}
3182#[cfg_attr(feature = "ts", derive(TS))]
3183#[cfg_attr(feature = "ts", ts(export))]
3184#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3186#[cfg_attr(feature = "serde", serde(tag = "type"))]
3187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3188#[repr(u32)]
3189pub enum MavOdidUaType {
3190    #[doc = "No UA (Unmanned Aircraft) type defined."]
3191    MAV_ODID_UA_TYPE_NONE = 0,
3192    #[doc = "Aeroplane/Airplane. Fixed wing."]
3193    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3194    #[doc = "Helicopter or multirotor."]
3195    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3196    #[doc = "Gyroplane."]
3197    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3198    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3199    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3200    #[doc = "Ornithopter."]
3201    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3202    #[doc = "Glider."]
3203    MAV_ODID_UA_TYPE_GLIDER = 6,
3204    #[doc = "Kite."]
3205    MAV_ODID_UA_TYPE_KITE = 7,
3206    #[doc = "Free Balloon."]
3207    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3208    #[doc = "Captive Balloon."]
3209    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3210    #[doc = "Airship. E.g. a blimp."]
3211    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3212    #[doc = "Free Fall/Parachute (unpowered)."]
3213    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3214    #[doc = "Rocket."]
3215    MAV_ODID_UA_TYPE_ROCKET = 12,
3216    #[doc = "Tethered powered aircraft."]
3217    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3218    #[doc = "Ground Obstacle."]
3219    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3220    #[doc = "Other type of aircraft not listed earlier."]
3221    MAV_ODID_UA_TYPE_OTHER = 15,
3222}
3223impl MavOdidUaType {
3224    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3225}
3226impl Default for MavOdidUaType {
3227    fn default() -> Self {
3228        Self::DEFAULT
3229    }
3230}
3231#[cfg_attr(feature = "ts", derive(TS))]
3232#[cfg_attr(feature = "ts", ts(export))]
3233#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3234#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3235#[cfg_attr(feature = "serde", serde(tag = "type"))]
3236#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3237#[repr(u32)]
3238pub enum MavOdidVerAcc {
3239    #[doc = "The vertical accuracy is unknown."]
3240    MAV_ODID_VER_ACC_UNKNOWN = 0,
3241    #[doc = "The vertical accuracy is smaller than 150 meter."]
3242    MAV_ODID_VER_ACC_150_METER = 1,
3243    #[doc = "The vertical accuracy is smaller than 45 meter."]
3244    MAV_ODID_VER_ACC_45_METER = 2,
3245    #[doc = "The vertical accuracy is smaller than 25 meter."]
3246    MAV_ODID_VER_ACC_25_METER = 3,
3247    #[doc = "The vertical accuracy is smaller than 10 meter."]
3248    MAV_ODID_VER_ACC_10_METER = 4,
3249    #[doc = "The vertical accuracy is smaller than 3 meter."]
3250    MAV_ODID_VER_ACC_3_METER = 5,
3251    #[doc = "The vertical accuracy is smaller than 1 meter."]
3252    MAV_ODID_VER_ACC_1_METER = 6,
3253}
3254impl MavOdidVerAcc {
3255    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3256}
3257impl Default for MavOdidVerAcc {
3258    fn default() -> Self {
3259        Self::DEFAULT
3260    }
3261}
3262#[cfg_attr(feature = "ts", derive(TS))]
3263#[cfg_attr(feature = "ts", ts(export))]
3264#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3266#[cfg_attr(feature = "serde", serde(tag = "type"))]
3267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3268#[repr(u32)]
3269#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3270pub enum MavParamExtType {
3271    #[doc = "8-bit unsigned integer"]
3272    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3273    #[doc = "8-bit signed integer"]
3274    MAV_PARAM_EXT_TYPE_INT8 = 2,
3275    #[doc = "16-bit unsigned integer"]
3276    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3277    #[doc = "16-bit signed integer"]
3278    MAV_PARAM_EXT_TYPE_INT16 = 4,
3279    #[doc = "32-bit unsigned integer"]
3280    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3281    #[doc = "32-bit signed integer"]
3282    MAV_PARAM_EXT_TYPE_INT32 = 6,
3283    #[doc = "64-bit unsigned integer"]
3284    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3285    #[doc = "64-bit signed integer"]
3286    MAV_PARAM_EXT_TYPE_INT64 = 8,
3287    #[doc = "32-bit floating-point"]
3288    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3289    #[doc = "64-bit floating-point"]
3290    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3291    #[doc = "Custom Type"]
3292    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3293}
3294impl MavParamExtType {
3295    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3296}
3297impl Default for MavParamExtType {
3298    fn default() -> Self {
3299        Self::DEFAULT
3300    }
3301}
3302#[cfg_attr(feature = "ts", derive(TS))]
3303#[cfg_attr(feature = "ts", ts(export))]
3304#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3305#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3306#[cfg_attr(feature = "serde", serde(tag = "type"))]
3307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3308#[repr(u32)]
3309#[doc = "Specifies the datatype of a MAVLink parameter."]
3310pub enum MavParamType {
3311    #[doc = "8-bit unsigned integer"]
3312    MAV_PARAM_TYPE_UINT8 = 1,
3313    #[doc = "8-bit signed integer"]
3314    MAV_PARAM_TYPE_INT8 = 2,
3315    #[doc = "16-bit unsigned integer"]
3316    MAV_PARAM_TYPE_UINT16 = 3,
3317    #[doc = "16-bit signed integer"]
3318    MAV_PARAM_TYPE_INT16 = 4,
3319    #[doc = "32-bit unsigned integer"]
3320    MAV_PARAM_TYPE_UINT32 = 5,
3321    #[doc = "32-bit signed integer"]
3322    MAV_PARAM_TYPE_INT32 = 6,
3323    #[doc = "64-bit unsigned integer"]
3324    MAV_PARAM_TYPE_UINT64 = 7,
3325    #[doc = "64-bit signed integer"]
3326    MAV_PARAM_TYPE_INT64 = 8,
3327    #[doc = "32-bit floating-point"]
3328    MAV_PARAM_TYPE_REAL32 = 9,
3329    #[doc = "64-bit floating-point"]
3330    MAV_PARAM_TYPE_REAL64 = 10,
3331}
3332impl MavParamType {
3333    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3334}
3335impl Default for MavParamType {
3336    fn default() -> Self {
3337        Self::DEFAULT
3338    }
3339}
3340bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3341impl MavPowerStatus {
3342    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3343}
3344impl Default for MavPowerStatus {
3345    fn default() -> Self {
3346        Self::DEFAULT
3347    }
3348}
3349bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3350impl MavProtocolCapability {
3351    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3352}
3353impl Default for MavProtocolCapability {
3354    fn default() -> Self {
3355        Self::DEFAULT
3356    }
3357}
3358#[cfg_attr(feature = "ts", derive(TS))]
3359#[cfg_attr(feature = "ts", ts(export))]
3360#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3361#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3362#[cfg_attr(feature = "serde", serde(tag = "type"))]
3363#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3364#[repr(u32)]
3365#[doc = "Result from a MAVLink command (MAV_CMD)"]
3366pub enum MavResult {
3367    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3368    MAV_RESULT_ACCEPTED = 0,
3369    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3370    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3371    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3372    MAV_RESULT_DENIED = 2,
3373    #[doc = "Command is not supported (unknown)."]
3374    MAV_RESULT_UNSUPPORTED = 3,
3375    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3376    MAV_RESULT_FAILED = 4,
3377    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3378    MAV_RESULT_IN_PROGRESS = 5,
3379    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3380    MAV_RESULT_CANCELLED = 6,
3381    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3382    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3383    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3384    MAV_RESULT_COMMAND_INT_ONLY = 8,
3385    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3386    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3387}
3388impl MavResult {
3389    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3390}
3391impl Default for MavResult {
3392    fn default() -> Self {
3393        Self::DEFAULT
3394    }
3395}
3396#[cfg_attr(feature = "ts", derive(TS))]
3397#[cfg_attr(feature = "ts", ts(export))]
3398#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3400#[cfg_attr(feature = "serde", serde(tag = "type"))]
3401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3402#[repr(u32)]
3403#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3404#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3405pub enum MavRoi {
3406    #[doc = "No region of interest."]
3407    MAV_ROI_NONE = 0,
3408    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3409    MAV_ROI_WPNEXT = 1,
3410    #[doc = "Point toward given waypoint."]
3411    MAV_ROI_WPINDEX = 2,
3412    #[doc = "Point toward fixed location."]
3413    MAV_ROI_LOCATION = 3,
3414    #[doc = "Point toward of given id."]
3415    MAV_ROI_TARGET = 4,
3416}
3417impl MavRoi {
3418    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3419}
3420impl Default for MavRoi {
3421    fn default() -> Self {
3422        Self::DEFAULT
3423    }
3424}
3425#[cfg_attr(feature = "ts", derive(TS))]
3426#[cfg_attr(feature = "ts", ts(export))]
3427#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3428#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3429#[cfg_attr(feature = "serde", serde(tag = "type"))]
3430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3431#[repr(u32)]
3432#[doc = "Enumeration of sensor orientation, according to its rotations"]
3433pub enum MavSensorOrientation {
3434    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3435    MAV_SENSOR_ROTATION_NONE = 0,
3436    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3437    MAV_SENSOR_ROTATION_YAW_45 = 1,
3438    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3439    MAV_SENSOR_ROTATION_YAW_90 = 2,
3440    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3441    MAV_SENSOR_ROTATION_YAW_135 = 3,
3442    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3443    MAV_SENSOR_ROTATION_YAW_180 = 4,
3444    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3445    MAV_SENSOR_ROTATION_YAW_225 = 5,
3446    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3447    MAV_SENSOR_ROTATION_YAW_270 = 6,
3448    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3449    MAV_SENSOR_ROTATION_YAW_315 = 7,
3450    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3451    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3452    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3453    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3454    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3455    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3456    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3457    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3458    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3459    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3460    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3461    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3462    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3463    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3464    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3465    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3466    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3467    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3468    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3469    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3470    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3471    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3472    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3473    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3474    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3475    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3476    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3477    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3478    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3479    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3480    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3481    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3482    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3483    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3484    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3485    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3486    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3487    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3488    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3489    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3490    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3491    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3492    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3493    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3494    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3495    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3496    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3497    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3498    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3499    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3500    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3501    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3502    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3503    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3504    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3505    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3506    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3507    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3508    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3509    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3510    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3511    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3512    #[doc = "Pitch: 315"]
3513    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3514    #[doc = "Roll: 90, Pitch: 315"]
3515    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3516    #[doc = "Custom orientation"]
3517    MAV_SENSOR_ROTATION_CUSTOM = 100,
3518}
3519impl MavSensorOrientation {
3520    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3521}
3522impl Default for MavSensorOrientation {
3523    fn default() -> Self {
3524        Self::DEFAULT
3525    }
3526}
3527#[cfg_attr(feature = "ts", derive(TS))]
3528#[cfg_attr(feature = "ts", ts(export))]
3529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3531#[cfg_attr(feature = "serde", serde(tag = "type"))]
3532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3533#[repr(u32)]
3534#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3535pub enum MavSeverity {
3536    #[doc = "System is unusable. This is a \"panic\" condition."]
3537    MAV_SEVERITY_EMERGENCY = 0,
3538    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3539    MAV_SEVERITY_ALERT = 1,
3540    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3541    MAV_SEVERITY_CRITICAL = 2,
3542    #[doc = "Indicates an error in secondary/redundant systems."]
3543    MAV_SEVERITY_ERROR = 3,
3544    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3545    MAV_SEVERITY_WARNING = 4,
3546    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3547    MAV_SEVERITY_NOTICE = 5,
3548    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3549    MAV_SEVERITY_INFO = 6,
3550    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3551    MAV_SEVERITY_DEBUG = 7,
3552}
3553impl MavSeverity {
3554    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3555}
3556impl Default for MavSeverity {
3557    fn default() -> Self {
3558        Self::DEFAULT
3559    }
3560}
3561#[cfg_attr(feature = "ts", derive(TS))]
3562#[cfg_attr(feature = "ts", ts(export))]
3563#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3565#[cfg_attr(feature = "serde", serde(tag = "type"))]
3566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3567#[repr(u32)]
3568#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3569pub enum MavStandardMode {
3570    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3571    MAV_STANDARD_MODE_NON_STANDARD = 0,
3572    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3573    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3574    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3575    MAV_STANDARD_MODE_ORBIT = 2,
3576    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3577    MAV_STANDARD_MODE_CRUISE = 3,
3578    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3579    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3580    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3581    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3582    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3583    MAV_STANDARD_MODE_MISSION = 6,
3584    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3585    MAV_STANDARD_MODE_LAND = 7,
3586    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3587    MAV_STANDARD_MODE_TAKEOFF = 8,
3588}
3589impl MavStandardMode {
3590    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3591}
3592impl Default for MavStandardMode {
3593    fn default() -> Self {
3594        Self::DEFAULT
3595    }
3596}
3597#[cfg_attr(feature = "ts", derive(TS))]
3598#[cfg_attr(feature = "ts", ts(export))]
3599#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3601#[cfg_attr(feature = "serde", serde(tag = "type"))]
3602#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3603#[repr(u32)]
3604pub enum MavState {
3605    #[doc = "Uninitialized system, state is unknown."]
3606    MAV_STATE_UNINIT = 0,
3607    #[doc = "System is booting up."]
3608    MAV_STATE_BOOT = 1,
3609    #[doc = "System is calibrating and not flight-ready."]
3610    MAV_STATE_CALIBRATING = 2,
3611    #[doc = "System is grounded and on standby. It can be launched any time."]
3612    MAV_STATE_STANDBY = 3,
3613    #[doc = "System is active and might be already airborne. Motors are engaged."]
3614    MAV_STATE_ACTIVE = 4,
3615    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3616    MAV_STATE_CRITICAL = 5,
3617    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3618    MAV_STATE_EMERGENCY = 6,
3619    #[doc = "System just initialized its power-down sequence, will shut down now."]
3620    MAV_STATE_POWEROFF = 7,
3621    #[doc = "System is terminating itself (failsafe or commanded)."]
3622    MAV_STATE_FLIGHT_TERMINATION = 8,
3623}
3624impl MavState {
3625    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3626}
3627impl Default for MavState {
3628    fn default() -> Self {
3629        Self::DEFAULT
3630    }
3631}
3632bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3633impl MavSysStatusSensor {
3634    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3635}
3636impl Default for MavSysStatusSensor {
3637    fn default() -> Self {
3638        Self::DEFAULT
3639    }
3640}
3641bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3642impl MavSysStatusSensorExtended {
3643    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3644}
3645impl Default for MavSysStatusSensorExtended {
3646    fn default() -> Self {
3647        Self::DEFAULT
3648    }
3649}
3650#[cfg_attr(feature = "ts", derive(TS))]
3651#[cfg_attr(feature = "ts", ts(export))]
3652#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3654#[cfg_attr(feature = "serde", serde(tag = "type"))]
3655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3656#[repr(u32)]
3657pub enum MavTunnelPayloadType {
3658    #[doc = "Encoding of payload unknown."]
3659    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3660    #[doc = "Registered for STorM32 gimbal controller."]
3661    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3662    #[doc = "Registered for STorM32 gimbal controller."]
3663    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3664    #[doc = "Registered for STorM32 gimbal controller."]
3665    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3666    #[doc = "Registered for STorM32 gimbal controller."]
3667    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3668    #[doc = "Registered for STorM32 gimbal controller."]
3669    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3670    #[doc = "Registered for STorM32 gimbal controller."]
3671    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3672    #[doc = "Registered for STorM32 gimbal controller."]
3673    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3674    #[doc = "Registered for STorM32 gimbal controller."]
3675    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3676    #[doc = "Registered for STorM32 gimbal controller."]
3677    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3678    #[doc = "Registered for STorM32 gimbal controller."]
3679    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3680    #[doc = "Registered for ModalAI remote OSD protocol."]
3681    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3682    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3683    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3684    #[doc = "Registered for ModalAI vendor use."]
3685    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3686}
3687impl MavTunnelPayloadType {
3688    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3689}
3690impl Default for MavTunnelPayloadType {
3691    fn default() -> Self {
3692        Self::DEFAULT
3693    }
3694}
3695#[cfg_attr(feature = "ts", derive(TS))]
3696#[cfg_attr(feature = "ts", ts(export))]
3697#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3699#[cfg_attr(feature = "serde", serde(tag = "type"))]
3700#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3701#[repr(u32)]
3702#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3703pub enum MavType {
3704    #[doc = "Generic micro air vehicle"]
3705    MAV_TYPE_GENERIC = 0,
3706    #[doc = "Fixed wing aircraft."]
3707    MAV_TYPE_FIXED_WING = 1,
3708    #[doc = "Quadrotor"]
3709    MAV_TYPE_QUADROTOR = 2,
3710    #[doc = "Coaxial helicopter"]
3711    MAV_TYPE_COAXIAL = 3,
3712    #[doc = "Normal helicopter with tail rotor."]
3713    MAV_TYPE_HELICOPTER = 4,
3714    #[doc = "Ground installation"]
3715    MAV_TYPE_ANTENNA_TRACKER = 5,
3716    #[doc = "Operator control unit / ground control station"]
3717    MAV_TYPE_GCS = 6,
3718    #[doc = "Airship, controlled"]
3719    MAV_TYPE_AIRSHIP = 7,
3720    #[doc = "Free balloon, uncontrolled"]
3721    MAV_TYPE_FREE_BALLOON = 8,
3722    #[doc = "Rocket"]
3723    MAV_TYPE_ROCKET = 9,
3724    #[doc = "Ground rover"]
3725    MAV_TYPE_GROUND_ROVER = 10,
3726    #[doc = "Surface vessel, boat, ship"]
3727    MAV_TYPE_SURFACE_BOAT = 11,
3728    #[doc = "Submarine"]
3729    MAV_TYPE_SUBMARINE = 12,
3730    #[doc = "Hexarotor"]
3731    MAV_TYPE_HEXAROTOR = 13,
3732    #[doc = "Octorotor"]
3733    MAV_TYPE_OCTOROTOR = 14,
3734    #[doc = "Tricopter"]
3735    MAV_TYPE_TRICOPTER = 15,
3736    #[doc = "Flapping wing"]
3737    MAV_TYPE_FLAPPING_WING = 16,
3738    #[doc = "Kite"]
3739    MAV_TYPE_KITE = 17,
3740    #[doc = "Onboard companion controller"]
3741    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3742    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3743    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3744    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3745    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3746    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3747    MAV_TYPE_VTOL_TILTROTOR = 21,
3748    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3749    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3750    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3751    MAV_TYPE_VTOL_TAILSITTER = 23,
3752    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3753    MAV_TYPE_VTOL_TILTWING = 24,
3754    #[doc = "VTOL reserved 5"]
3755    MAV_TYPE_VTOL_RESERVED5 = 25,
3756    #[doc = "Gimbal"]
3757    MAV_TYPE_GIMBAL = 26,
3758    #[doc = "ADSB system"]
3759    MAV_TYPE_ADSB = 27,
3760    #[doc = "Steerable, nonrigid airfoil"]
3761    MAV_TYPE_PARAFOIL = 28,
3762    #[doc = "Dodecarotor"]
3763    MAV_TYPE_DODECAROTOR = 29,
3764    #[doc = "Camera"]
3765    MAV_TYPE_CAMERA = 30,
3766    #[doc = "Charging station"]
3767    MAV_TYPE_CHARGING_STATION = 31,
3768    #[doc = "FLARM collision avoidance system"]
3769    MAV_TYPE_FLARM = 32,
3770    #[doc = "Servo"]
3771    MAV_TYPE_SERVO = 33,
3772    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3773    MAV_TYPE_ODID = 34,
3774    #[doc = "Decarotor"]
3775    MAV_TYPE_DECAROTOR = 35,
3776    #[doc = "Battery"]
3777    MAV_TYPE_BATTERY = 36,
3778    #[doc = "Parachute"]
3779    MAV_TYPE_PARACHUTE = 37,
3780    #[doc = "Log"]
3781    MAV_TYPE_LOG = 38,
3782    #[doc = "OSD"]
3783    MAV_TYPE_OSD = 39,
3784    #[doc = "IMU"]
3785    MAV_TYPE_IMU = 40,
3786    #[doc = "GPS"]
3787    MAV_TYPE_GPS = 41,
3788    #[doc = "Winch"]
3789    MAV_TYPE_WINCH = 42,
3790    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3791    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3792    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3793    MAV_TYPE_ILLUMINATOR = 44,
3794    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3795    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3796}
3797impl MavType {
3798    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3799}
3800impl Default for MavType {
3801    fn default() -> Self {
3802        Self::DEFAULT
3803    }
3804}
3805#[cfg_attr(feature = "ts", derive(TS))]
3806#[cfg_attr(feature = "ts", ts(export))]
3807#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3808#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3809#[cfg_attr(feature = "serde", serde(tag = "type"))]
3810#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3811#[repr(u32)]
3812#[doc = "Enumeration of VTOL states"]
3813pub enum MavVtolState {
3814    #[doc = "MAV is not configured as VTOL"]
3815    MAV_VTOL_STATE_UNDEFINED = 0,
3816    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3817    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3818    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3819    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3820    #[doc = "VTOL is in multicopter state"]
3821    MAV_VTOL_STATE_MC = 3,
3822    #[doc = "VTOL is in fixed-wing state"]
3823    MAV_VTOL_STATE_FW = 4,
3824}
3825impl MavVtolState {
3826    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3827}
3828impl Default for MavVtolState {
3829    fn default() -> Self {
3830        Self::DEFAULT
3831    }
3832}
3833bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3834impl MavWinchStatusFlag {
3835    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3836}
3837impl Default for MavWinchStatusFlag {
3838    fn default() -> Self {
3839        Self::DEFAULT
3840    }
3841}
3842#[cfg_attr(feature = "ts", derive(TS))]
3843#[cfg_attr(feature = "ts", ts(export))]
3844#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3846#[cfg_attr(feature = "serde", serde(tag = "type"))]
3847#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3848#[repr(u32)]
3849pub enum MavlinkDataStreamType {
3850    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3851    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3852    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3853    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3854    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3855    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3856}
3857impl MavlinkDataStreamType {
3858    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3859}
3860impl Default for MavlinkDataStreamType {
3861    fn default() -> Self {
3862        Self::DEFAULT
3863    }
3864}
3865#[cfg_attr(feature = "ts", derive(TS))]
3866#[cfg_attr(feature = "ts", ts(export))]
3867#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3868#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3869#[cfg_attr(feature = "serde", serde(tag = "type"))]
3870#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3871#[repr(u32)]
3872#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3873pub enum MissionState {
3874    #[doc = "The mission status reporting is not supported."]
3875    MISSION_STATE_UNKNOWN = 0,
3876    #[doc = "No mission on the vehicle."]
3877    MISSION_STATE_NO_MISSION = 1,
3878    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3879    MISSION_STATE_NOT_STARTED = 2,
3880    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3881    MISSION_STATE_ACTIVE = 3,
3882    #[doc = "Mission is paused when in auto mode."]
3883    MISSION_STATE_PAUSED = 4,
3884    #[doc = "Mission has executed all mission items."]
3885    MISSION_STATE_COMPLETE = 5,
3886}
3887impl MissionState {
3888    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3889}
3890impl Default for MissionState {
3891    fn default() -> Self {
3892        Self::DEFAULT
3893    }
3894}
3895#[cfg_attr(feature = "ts", derive(TS))]
3896#[cfg_attr(feature = "ts", ts(export))]
3897#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3899#[cfg_attr(feature = "serde", serde(tag = "type"))]
3900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3901#[repr(u32)]
3902#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3903pub enum MotorTestOrder {
3904    #[doc = "Default autopilot motor test method."]
3905    MOTOR_TEST_ORDER_DEFAULT = 0,
3906    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3907    MOTOR_TEST_ORDER_SEQUENCE = 1,
3908    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3909    MOTOR_TEST_ORDER_BOARD = 2,
3910}
3911impl MotorTestOrder {
3912    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3913}
3914impl Default for MotorTestOrder {
3915    fn default() -> Self {
3916        Self::DEFAULT
3917    }
3918}
3919#[cfg_attr(feature = "ts", derive(TS))]
3920#[cfg_attr(feature = "ts", ts(export))]
3921#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3923#[cfg_attr(feature = "serde", serde(tag = "type"))]
3924#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3925#[repr(u32)]
3926#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3927pub enum MotorTestThrottleType {
3928    #[doc = "Throttle as a percentage (0 ~ 100)"]
3929    MOTOR_TEST_THROTTLE_PERCENT = 0,
3930    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3931    MOTOR_TEST_THROTTLE_PWM = 1,
3932    #[doc = "Throttle pass-through from pilot's transmitter."]
3933    MOTOR_TEST_THROTTLE_PILOT = 2,
3934    #[doc = "Per-motor compass calibration test."]
3935    MOTOR_TEST_COMPASS_CAL = 3,
3936}
3937impl MotorTestThrottleType {
3938    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3939}
3940impl Default for MotorTestThrottleType {
3941    fn default() -> Self {
3942        Self::DEFAULT
3943    }
3944}
3945#[cfg_attr(feature = "ts", derive(TS))]
3946#[cfg_attr(feature = "ts", ts(export))]
3947#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3949#[cfg_attr(feature = "serde", serde(tag = "type"))]
3950#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3951#[repr(u32)]
3952pub enum NavVtolLandOptions {
3953    #[doc = "Default autopilot landing behaviour."]
3954    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3955    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3956    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3957    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3958    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3959}
3960impl NavVtolLandOptions {
3961    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3962}
3963impl Default for NavVtolLandOptions {
3964    fn default() -> Self {
3965        Self::DEFAULT
3966    }
3967}
3968#[cfg_attr(feature = "ts", derive(TS))]
3969#[cfg_attr(feature = "ts", ts(export))]
3970#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3971#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3972#[cfg_attr(feature = "serde", serde(tag = "type"))]
3973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3974#[repr(u32)]
3975#[doc = "Yaw behaviour during orbit flight."]
3976pub enum OrbitYawBehaviour {
3977    #[doc = "Vehicle front points to the center (default)."]
3978    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3979    #[doc = "Vehicle front holds heading when message received."]
3980    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3981    #[doc = "Yaw uncontrolled."]
3982    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3983    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3984    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3985    #[doc = "Yaw controlled by RC input."]
3986    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3987    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3988    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3989}
3990impl OrbitYawBehaviour {
3991    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3992}
3993impl Default for OrbitYawBehaviour {
3994    fn default() -> Self {
3995        Self::DEFAULT
3996    }
3997}
3998#[cfg_attr(feature = "ts", derive(TS))]
3999#[cfg_attr(feature = "ts", ts(export))]
4000#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4001#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4002#[cfg_attr(feature = "serde", serde(tag = "type"))]
4003#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4004#[repr(u32)]
4005#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
4006pub enum ParachuteAction {
4007    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
4008    PARACHUTE_DISABLE = 0,
4009    #[doc = "Enable auto-release of parachute."]
4010    PARACHUTE_ENABLE = 1,
4011    #[doc = "Release parachute and kill motors."]
4012    PARACHUTE_RELEASE = 2,
4013}
4014impl ParachuteAction {
4015    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
4016}
4017impl Default for ParachuteAction {
4018    fn default() -> Self {
4019        Self::DEFAULT
4020    }
4021}
4022#[cfg_attr(feature = "ts", derive(TS))]
4023#[cfg_attr(feature = "ts", ts(export))]
4024#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4025#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4026#[cfg_attr(feature = "serde", serde(tag = "type"))]
4027#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4028#[repr(u32)]
4029#[doc = "Result from PARAM_EXT_SET message."]
4030pub enum ParamAck {
4031    #[doc = "Parameter value ACCEPTED and SET"]
4032    PARAM_ACK_ACCEPTED = 0,
4033    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
4034    PARAM_ACK_VALUE_UNSUPPORTED = 1,
4035    #[doc = "Parameter failed to set"]
4036    PARAM_ACK_FAILED = 2,
4037    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
4038    PARAM_ACK_IN_PROGRESS = 3,
4039}
4040impl ParamAck {
4041    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
4042}
4043impl Default for ParamAck {
4044    fn default() -> Self {
4045        Self::DEFAULT
4046    }
4047}
4048bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
4049impl PositionTargetTypemask {
4050    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4051}
4052impl Default for PositionTargetTypemask {
4053    fn default() -> Self {
4054        Self::DEFAULT
4055    }
4056}
4057#[cfg_attr(feature = "ts", derive(TS))]
4058#[cfg_attr(feature = "ts", ts(export))]
4059#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4061#[cfg_attr(feature = "serde", serde(tag = "type"))]
4062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4063#[repr(u32)]
4064#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4065pub enum PrecisionLandMode {
4066    #[doc = "Normal (non-precision) landing."]
4067    PRECISION_LAND_MODE_DISABLED = 0,
4068    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4069    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4070    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4071    PRECISION_LAND_MODE_REQUIRED = 2,
4072}
4073impl PrecisionLandMode {
4074    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4075}
4076impl Default for PrecisionLandMode {
4077    fn default() -> Self {
4078        Self::DEFAULT
4079    }
4080}
4081#[cfg_attr(feature = "ts", derive(TS))]
4082#[cfg_attr(feature = "ts", ts(export))]
4083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4085#[cfg_attr(feature = "serde", serde(tag = "type"))]
4086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4087#[repr(u32)]
4088#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4089pub enum PreflightStorageMissionAction {
4090    #[doc = "Read current mission data from persistent storage"]
4091    MISSION_READ_PERSISTENT = 0,
4092    #[doc = "Write current mission data to persistent storage"]
4093    MISSION_WRITE_PERSISTENT = 1,
4094    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4095    MISSION_RESET_DEFAULT = 2,
4096}
4097impl PreflightStorageMissionAction {
4098    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4099}
4100impl Default for PreflightStorageMissionAction {
4101    fn default() -> Self {
4102        Self::DEFAULT
4103    }
4104}
4105#[cfg_attr(feature = "ts", derive(TS))]
4106#[cfg_attr(feature = "ts", ts(export))]
4107#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4109#[cfg_attr(feature = "serde", serde(tag = "type"))]
4110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4111#[repr(u32)]
4112#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4113pub enum PreflightStorageParameterAction {
4114    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4115    PARAM_READ_PERSISTENT = 0,
4116    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4117    PARAM_WRITE_PERSISTENT = 1,
4118    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4119    PARAM_RESET_CONFIG_DEFAULT = 2,
4120    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4121    PARAM_RESET_SENSOR_DEFAULT = 3,
4122    #[doc = "Reset all parameters, including operation counters, to default values"]
4123    PARAM_RESET_ALL_DEFAULT = 4,
4124}
4125impl PreflightStorageParameterAction {
4126    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4127}
4128impl Default for PreflightStorageParameterAction {
4129    fn default() -> Self {
4130        Self::DEFAULT
4131    }
4132}
4133#[cfg_attr(feature = "ts", derive(TS))]
4134#[cfg_attr(feature = "ts", ts(export))]
4135#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4137#[cfg_attr(feature = "serde", serde(tag = "type"))]
4138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4139#[repr(u32)]
4140#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4141pub enum RcSubType {
4142    #[doc = "Spektrum DSM2"]
4143    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4144    #[doc = "Spektrum DSMX"]
4145    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4146    #[doc = "Spektrum DSMX8"]
4147    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4148}
4149impl RcSubType {
4150    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4151}
4152impl Default for RcSubType {
4153    fn default() -> Self {
4154        Self::DEFAULT
4155    }
4156}
4157#[cfg_attr(feature = "ts", derive(TS))]
4158#[cfg_attr(feature = "ts", ts(export))]
4159#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4160#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4161#[cfg_attr(feature = "serde", serde(tag = "type"))]
4162#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4163#[repr(u32)]
4164#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4165pub enum RcType {
4166    #[doc = "Spektrum"]
4167    RC_TYPE_SPEKTRUM = 0,
4168    #[doc = "CRSF"]
4169    RC_TYPE_CRSF = 1,
4170}
4171impl RcType {
4172    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4173}
4174impl Default for RcType {
4175    fn default() -> Self {
4176        Self::DEFAULT
4177    }
4178}
4179#[cfg_attr(feature = "ts", derive(TS))]
4180#[cfg_attr(feature = "ts", ts(export))]
4181#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4183#[cfg_attr(feature = "serde", serde(tag = "type"))]
4184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4185#[repr(u32)]
4186#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4187pub enum RebootShutdownConditions {
4188    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4189    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4190    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4191    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4192}
4193impl RebootShutdownConditions {
4194    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4195}
4196impl Default for RebootShutdownConditions {
4197    fn default() -> Self {
4198        Self::DEFAULT
4199    }
4200}
4201#[cfg_attr(feature = "ts", derive(TS))]
4202#[cfg_attr(feature = "ts", ts(export))]
4203#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4205#[cfg_attr(feature = "serde", serde(tag = "type"))]
4206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4207#[repr(u32)]
4208#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4209pub enum RtkBaselineCoordinateSystem {
4210    #[doc = "Earth-centered, Earth-fixed"]
4211    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4212    #[doc = "RTK basestation centered, north, east, down"]
4213    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4214}
4215impl RtkBaselineCoordinateSystem {
4216    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4217}
4218impl Default for RtkBaselineCoordinateSystem {
4219    fn default() -> Self {
4220        Self::DEFAULT
4221    }
4222}
4223#[cfg_attr(feature = "ts", derive(TS))]
4224#[cfg_attr(feature = "ts", ts(export))]
4225#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4226#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4227#[cfg_attr(feature = "serde", serde(tag = "type"))]
4228#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4229#[repr(u32)]
4230#[doc = "Possible safety switch states."]
4231pub enum SafetySwitchState {
4232    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4233    SAFETY_SWITCH_STATE_SAFE = 0,
4234    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4235    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4236}
4237impl SafetySwitchState {
4238    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4239}
4240impl Default for SafetySwitchState {
4241    fn default() -> Self {
4242        Self::DEFAULT
4243    }
4244}
4245#[cfg_attr(feature = "ts", derive(TS))]
4246#[cfg_attr(feature = "ts", ts(export))]
4247#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4249#[cfg_attr(feature = "serde", serde(tag = "type"))]
4250#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4251#[repr(u32)]
4252#[doc = "SERIAL_CONTROL device types"]
4253pub enum SerialControlDev {
4254    #[doc = "First telemetry port"]
4255    SERIAL_CONTROL_DEV_TELEM1 = 0,
4256    #[doc = "Second telemetry port"]
4257    SERIAL_CONTROL_DEV_TELEM2 = 1,
4258    #[doc = "First GPS port"]
4259    SERIAL_CONTROL_DEV_GPS1 = 2,
4260    #[doc = "Second GPS port"]
4261    SERIAL_CONTROL_DEV_GPS2 = 3,
4262    #[doc = "system shell"]
4263    SERIAL_CONTROL_DEV_SHELL = 10,
4264    #[doc = "SERIAL0"]
4265    SERIAL_CONTROL_SERIAL0 = 100,
4266    #[doc = "SERIAL1"]
4267    SERIAL_CONTROL_SERIAL1 = 101,
4268    #[doc = "SERIAL2"]
4269    SERIAL_CONTROL_SERIAL2 = 102,
4270    #[doc = "SERIAL3"]
4271    SERIAL_CONTROL_SERIAL3 = 103,
4272    #[doc = "SERIAL4"]
4273    SERIAL_CONTROL_SERIAL4 = 104,
4274    #[doc = "SERIAL5"]
4275    SERIAL_CONTROL_SERIAL5 = 105,
4276    #[doc = "SERIAL6"]
4277    SERIAL_CONTROL_SERIAL6 = 106,
4278    #[doc = "SERIAL7"]
4279    SERIAL_CONTROL_SERIAL7 = 107,
4280    #[doc = "SERIAL8"]
4281    SERIAL_CONTROL_SERIAL8 = 108,
4282    #[doc = "SERIAL9"]
4283    SERIAL_CONTROL_SERIAL9 = 109,
4284}
4285impl SerialControlDev {
4286    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4287}
4288impl Default for SerialControlDev {
4289    fn default() -> Self {
4290        Self::DEFAULT
4291    }
4292}
4293bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4294impl SerialControlFlag {
4295    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4296}
4297impl Default for SerialControlFlag {
4298    fn default() -> Self {
4299        Self::DEFAULT
4300    }
4301}
4302#[cfg_attr(feature = "ts", derive(TS))]
4303#[cfg_attr(feature = "ts", ts(export))]
4304#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4305#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4306#[cfg_attr(feature = "serde", serde(tag = "type"))]
4307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4308#[repr(u32)]
4309#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4310pub enum SetFocusType {
4311    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4312    FOCUS_TYPE_STEP = 0,
4313    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4314    FOCUS_TYPE_CONTINUOUS = 1,
4315    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4316    FOCUS_TYPE_RANGE = 2,
4317    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4318    FOCUS_TYPE_METERS = 3,
4319    #[doc = "Focus automatically."]
4320    FOCUS_TYPE_AUTO = 4,
4321    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4322    FOCUS_TYPE_AUTO_SINGLE = 5,
4323    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4324    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4325}
4326impl SetFocusType {
4327    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4328}
4329impl Default for SetFocusType {
4330    fn default() -> Self {
4331        Self::DEFAULT
4332    }
4333}
4334#[cfg_attr(feature = "ts", derive(TS))]
4335#[cfg_attr(feature = "ts", ts(export))]
4336#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4338#[cfg_attr(feature = "serde", serde(tag = "type"))]
4339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4340#[repr(u32)]
4341#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4342pub enum SpeedType {
4343    #[doc = "Airspeed"]
4344    SPEED_TYPE_AIRSPEED = 0,
4345    #[doc = "Groundspeed"]
4346    SPEED_TYPE_GROUNDSPEED = 1,
4347    #[doc = "Climb speed"]
4348    SPEED_TYPE_CLIMB_SPEED = 2,
4349    #[doc = "Descent speed"]
4350    SPEED_TYPE_DESCENT_SPEED = 3,
4351}
4352impl SpeedType {
4353    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4354}
4355impl Default for SpeedType {
4356    fn default() -> Self {
4357        Self::DEFAULT
4358    }
4359}
4360#[cfg_attr(feature = "ts", derive(TS))]
4361#[cfg_attr(feature = "ts", ts(export))]
4362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4364#[cfg_attr(feature = "serde", serde(tag = "type"))]
4365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4366#[repr(u32)]
4367#[doc = "Flags to indicate the status of camera storage."]
4368pub enum StorageStatus {
4369    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4370    STORAGE_STATUS_EMPTY = 0,
4371    #[doc = "Storage present but unformatted."]
4372    STORAGE_STATUS_UNFORMATTED = 1,
4373    #[doc = "Storage present and ready."]
4374    STORAGE_STATUS_READY = 2,
4375    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4376    STORAGE_STATUS_NOT_SUPPORTED = 3,
4377}
4378impl StorageStatus {
4379    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4380}
4381impl Default for StorageStatus {
4382    fn default() -> Self {
4383        Self::DEFAULT
4384    }
4385}
4386#[cfg_attr(feature = "ts", derive(TS))]
4387#[cfg_attr(feature = "ts", ts(export))]
4388#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4390#[cfg_attr(feature = "serde", serde(tag = "type"))]
4391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4392#[repr(u32)]
4393#[doc = "Flags to indicate the type of storage."]
4394pub enum StorageType {
4395    #[doc = "Storage type is not known."]
4396    STORAGE_TYPE_UNKNOWN = 0,
4397    #[doc = "Storage type is USB device."]
4398    STORAGE_TYPE_USB_STICK = 1,
4399    #[doc = "Storage type is SD card."]
4400    STORAGE_TYPE_SD = 2,
4401    #[doc = "Storage type is microSD card."]
4402    STORAGE_TYPE_MICROSD = 3,
4403    #[doc = "Storage type is CFast."]
4404    STORAGE_TYPE_CF = 4,
4405    #[doc = "Storage type is CFexpress."]
4406    STORAGE_TYPE_CFE = 5,
4407    #[doc = "Storage type is XQD."]
4408    STORAGE_TYPE_XQD = 6,
4409    #[doc = "Storage type is HD mass storage type."]
4410    STORAGE_TYPE_HD = 7,
4411    #[doc = "Storage type is other, not listed type."]
4412    STORAGE_TYPE_OTHER = 254,
4413}
4414impl StorageType {
4415    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4416}
4417impl Default for StorageType {
4418    fn default() -> Self {
4419        Self::DEFAULT
4420    }
4421}
4422bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4423impl StorageUsageFlag {
4424    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4425}
4426impl Default for StorageUsageFlag {
4427    fn default() -> Self {
4428        Self::DEFAULT
4429    }
4430}
4431#[cfg_attr(feature = "ts", derive(TS))]
4432#[cfg_attr(feature = "ts", ts(export))]
4433#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4434#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4435#[cfg_attr(feature = "serde", serde(tag = "type"))]
4436#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4437#[repr(u32)]
4438#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4439pub enum TuneFormat {
4440    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4441    TUNE_FORMAT_QBASIC1_1 = 1,
4442    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4443    TUNE_FORMAT_MML_MODERN = 2,
4444}
4445impl TuneFormat {
4446    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4447}
4448impl Default for TuneFormat {
4449    fn default() -> Self {
4450        Self::DEFAULT
4451    }
4452}
4453#[cfg_attr(feature = "ts", derive(TS))]
4454#[cfg_attr(feature = "ts", ts(export))]
4455#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4456#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4457#[cfg_attr(feature = "serde", serde(tag = "type"))]
4458#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4459#[repr(u32)]
4460#[doc = "Generalized UAVCAN node health"]
4461pub enum UavcanNodeHealth {
4462    #[doc = "The node is functioning properly."]
4463    UAVCAN_NODE_HEALTH_OK = 0,
4464    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4465    UAVCAN_NODE_HEALTH_WARNING = 1,
4466    #[doc = "The node has encountered a major failure."]
4467    UAVCAN_NODE_HEALTH_ERROR = 2,
4468    #[doc = "The node has suffered a fatal malfunction."]
4469    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4470}
4471impl UavcanNodeHealth {
4472    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4473}
4474impl Default for UavcanNodeHealth {
4475    fn default() -> Self {
4476        Self::DEFAULT
4477    }
4478}
4479#[cfg_attr(feature = "ts", derive(TS))]
4480#[cfg_attr(feature = "ts", ts(export))]
4481#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4483#[cfg_attr(feature = "serde", serde(tag = "type"))]
4484#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4485#[repr(u32)]
4486#[doc = "Generalized UAVCAN node mode"]
4487pub enum UavcanNodeMode {
4488    #[doc = "The node is performing its primary functions."]
4489    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4490    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4491    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4492    #[doc = "The node is under maintenance."]
4493    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4494    #[doc = "The node is in the process of updating its software."]
4495    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4496    #[doc = "The node is no longer available online."]
4497    UAVCAN_NODE_MODE_OFFLINE = 7,
4498}
4499impl UavcanNodeMode {
4500    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4501}
4502impl Default for UavcanNodeMode {
4503    fn default() -> Self {
4504        Self::DEFAULT
4505    }
4506}
4507bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4508impl UtmDataAvailFlags {
4509    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4510}
4511impl Default for UtmDataAvailFlags {
4512    fn default() -> Self {
4513        Self::DEFAULT
4514    }
4515}
4516#[cfg_attr(feature = "ts", derive(TS))]
4517#[cfg_attr(feature = "ts", ts(export))]
4518#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4519#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4520#[cfg_attr(feature = "serde", serde(tag = "type"))]
4521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4522#[repr(u32)]
4523#[doc = "Airborne status of UAS."]
4524pub enum UtmFlightState {
4525    #[doc = "The flight state can't be determined."]
4526    UTM_FLIGHT_STATE_UNKNOWN = 1,
4527    #[doc = "UAS on ground."]
4528    UTM_FLIGHT_STATE_GROUND = 2,
4529    #[doc = "UAS airborne."]
4530    UTM_FLIGHT_STATE_AIRBORNE = 3,
4531    #[doc = "UAS is in an emergency flight state."]
4532    UTM_FLIGHT_STATE_EMERGENCY = 16,
4533    #[doc = "UAS has no active controls."]
4534    UTM_FLIGHT_STATE_NOCTRL = 32,
4535}
4536impl UtmFlightState {
4537    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4538}
4539impl Default for UtmFlightState {
4540    fn default() -> Self {
4541        Self::DEFAULT
4542    }
4543}
4544#[cfg_attr(feature = "ts", derive(TS))]
4545#[cfg_attr(feature = "ts", ts(export))]
4546#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4548#[cfg_attr(feature = "serde", serde(tag = "type"))]
4549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4550#[repr(u32)]
4551#[doc = "Video stream encodings"]
4552pub enum VideoStreamEncoding {
4553    #[doc = "Stream encoding is unknown"]
4554    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4555    #[doc = "Stream encoding is H.264"]
4556    VIDEO_STREAM_ENCODING_H264 = 1,
4557    #[doc = "Stream encoding is H.265"]
4558    VIDEO_STREAM_ENCODING_H265 = 2,
4559}
4560impl VideoStreamEncoding {
4561    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4562}
4563impl Default for VideoStreamEncoding {
4564    fn default() -> Self {
4565        Self::DEFAULT
4566    }
4567}
4568bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4569impl VideoStreamStatusFlags {
4570    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4571}
4572impl Default for VideoStreamStatusFlags {
4573    fn default() -> Self {
4574        Self::DEFAULT
4575    }
4576}
4577#[cfg_attr(feature = "ts", derive(TS))]
4578#[cfg_attr(feature = "ts", ts(export))]
4579#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4581#[cfg_attr(feature = "serde", serde(tag = "type"))]
4582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4583#[repr(u32)]
4584#[doc = "Video stream types"]
4585pub enum VideoStreamType {
4586    #[doc = "Stream is RTSP"]
4587    VIDEO_STREAM_TYPE_RTSP = 0,
4588    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4589    VIDEO_STREAM_TYPE_RTPUDP = 1,
4590    #[doc = "Stream is MPEG on TCP"]
4591    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4592    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4593    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4594}
4595impl VideoStreamType {
4596    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4597}
4598impl Default for VideoStreamType {
4599    fn default() -> Self {
4600        Self::DEFAULT
4601    }
4602}
4603#[cfg_attr(feature = "ts", derive(TS))]
4604#[cfg_attr(feature = "ts", ts(export))]
4605#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4607#[cfg_attr(feature = "serde", serde(tag = "type"))]
4608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4609#[repr(u32)]
4610#[doc = "Direction of VTOL transition"]
4611pub enum VtolTransitionHeading {
4612    #[doc = "Respect the heading configuration of the vehicle."]
4613    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4614    #[doc = "Use the heading pointing towards the next waypoint."]
4615    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4616    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4617    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4618    #[doc = "Use the specified heading in parameter 4."]
4619    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4620    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4621    VTOL_TRANSITION_HEADING_ANY = 4,
4622}
4623impl VtolTransitionHeading {
4624    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4625}
4626impl Default for VtolTransitionHeading {
4627    fn default() -> Self {
4628        Self::DEFAULT
4629    }
4630}
4631#[cfg_attr(feature = "ts", derive(TS))]
4632#[cfg_attr(feature = "ts", ts(export))]
4633#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4635#[cfg_attr(feature = "serde", serde(tag = "type"))]
4636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4637#[repr(u32)]
4638#[doc = "WiFi Mode."]
4639pub enum WifiConfigApMode {
4640    #[doc = "WiFi mode is undefined."]
4641    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4642    #[doc = "WiFi configured as an access point."]
4643    WIFI_CONFIG_AP_MODE_AP = 1,
4644    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4645    WIFI_CONFIG_AP_MODE_STATION = 2,
4646    #[doc = "WiFi disabled."]
4647    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4648}
4649impl WifiConfigApMode {
4650    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4651}
4652impl Default for WifiConfigApMode {
4653    fn default() -> Self {
4654        Self::DEFAULT
4655    }
4656}
4657#[cfg_attr(feature = "ts", derive(TS))]
4658#[cfg_attr(feature = "ts", ts(export))]
4659#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4660#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4661#[cfg_attr(feature = "serde", serde(tag = "type"))]
4662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4663#[repr(u32)]
4664#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4665pub enum WifiConfigApResponse {
4666    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4667    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4668    #[doc = "Changes accepted."]
4669    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4670    #[doc = "Changes rejected."]
4671    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4672    #[doc = "Invalid Mode."]
4673    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4674    #[doc = "Invalid SSID."]
4675    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4676    #[doc = "Invalid Password."]
4677    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4678}
4679impl WifiConfigApResponse {
4680    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4681}
4682impl Default for WifiConfigApResponse {
4683    fn default() -> Self {
4684        Self::DEFAULT
4685    }
4686}
4687#[cfg_attr(feature = "ts", derive(TS))]
4688#[cfg_attr(feature = "ts", ts(export))]
4689#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4691#[cfg_attr(feature = "serde", serde(tag = "type"))]
4692#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4693#[repr(u32)]
4694#[doc = "Winch actions."]
4695pub enum WinchActions {
4696    #[doc = "Allow motor to freewheel."]
4697    WINCH_RELAXED = 0,
4698    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4699    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4700    #[doc = "Wind or unwind line at specified rate."]
4701    WINCH_RATE_CONTROL = 2,
4702    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4703    WINCH_LOCK = 3,
4704    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4705    WINCH_DELIVER = 4,
4706    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4707    WINCH_HOLD = 5,
4708    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4709    WINCH_RETRACT = 6,
4710    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4711    WINCH_LOAD_LINE = 7,
4712    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4713    WINCH_ABANDON_LINE = 8,
4714    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4715    WINCH_LOAD_PAYLOAD = 9,
4716}
4717impl WinchActions {
4718    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4719}
4720impl Default for WinchActions {
4721    fn default() -> Self {
4722        Self::DEFAULT
4723    }
4724}
4725#[doc = "Set the vehicle attitude and body angular rates."]
4726#[doc = ""]
4727#[doc = "ID: 140"]
4728#[derive(Debug, Clone, PartialEq)]
4729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4731#[cfg_attr(feature = "ts", derive(TS))]
4732#[cfg_attr(feature = "ts", ts(export))]
4733pub struct ACTUATOR_CONTROL_TARGET_DATA {
4734    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4735    pub time_usec: u64,
4736    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4737    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4738    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4739    pub controls: [f32; 8],
4740    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4741    pub group_mlx: u8,
4742}
4743impl ACTUATOR_CONTROL_TARGET_DATA {
4744    pub const ENCODED_LEN: usize = 41usize;
4745    pub const DEFAULT: Self = Self {
4746        time_usec: 0_u64,
4747        controls: [0.0_f32; 8usize],
4748        group_mlx: 0_u8,
4749    };
4750    #[cfg(feature = "arbitrary")]
4751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4752        use arbitrary::{Arbitrary, Unstructured};
4753        let mut buf = [0u8; 1024];
4754        rng.fill_bytes(&mut buf);
4755        let mut unstructured = Unstructured::new(&buf);
4756        Self::arbitrary(&mut unstructured).unwrap_or_default()
4757    }
4758}
4759impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4760    fn default() -> Self {
4761        Self::DEFAULT.clone()
4762    }
4763}
4764impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4765    type Message = MavMessage;
4766    const ID: u32 = 140u32;
4767    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4768    const EXTRA_CRC: u8 = 181u8;
4769    const ENCODED_LEN: usize = 41usize;
4770    fn deser(
4771        _version: MavlinkVersion,
4772        __input: &[u8],
4773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4774        let avail_len = __input.len();
4775        let mut payload_buf = [0; Self::ENCODED_LEN];
4776        let mut buf = if avail_len < Self::ENCODED_LEN {
4777            payload_buf[0..avail_len].copy_from_slice(__input);
4778            Bytes::new(&payload_buf)
4779        } else {
4780            Bytes::new(__input)
4781        };
4782        let mut __struct = Self::default();
4783        __struct.time_usec = buf.get_u64_le()?;
4784        for v in &mut __struct.controls {
4785            let val = buf.get_f32_le()?;
4786            *v = val;
4787        }
4788        __struct.group_mlx = buf.get_u8()?;
4789        Ok(__struct)
4790    }
4791    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4792        let mut __tmp = BytesMut::new(bytes);
4793        #[allow(clippy::absurd_extreme_comparisons)]
4794        #[allow(unused_comparisons)]
4795        if __tmp.remaining() < Self::ENCODED_LEN {
4796            panic!(
4797                "buffer is too small (need {} bytes, but got {})",
4798                Self::ENCODED_LEN,
4799                __tmp.remaining(),
4800            )
4801        }
4802        __tmp.put_u64_le(self.time_usec);
4803        for val in &self.controls {
4804            __tmp.put_f32_le(*val);
4805        }
4806        __tmp.put_u8(self.group_mlx);
4807        if matches!(version, MavlinkVersion::V2) {
4808            let len = __tmp.len();
4809            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4810        } else {
4811            __tmp.len()
4812        }
4813    }
4814}
4815#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4816#[doc = ""]
4817#[doc = "ID: 375"]
4818#[derive(Debug, Clone, PartialEq)]
4819#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4821#[cfg_attr(feature = "ts", derive(TS))]
4822#[cfg_attr(feature = "ts", ts(export))]
4823pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4824    #[doc = "Timestamp (since system boot)."]
4825    pub time_usec: u64,
4826    #[doc = "Active outputs"]
4827    pub active: u32,
4828    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4829    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4830    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4831    pub actuator: [f32; 32],
4832}
4833impl ACTUATOR_OUTPUT_STATUS_DATA {
4834    pub const ENCODED_LEN: usize = 140usize;
4835    pub const DEFAULT: Self = Self {
4836        time_usec: 0_u64,
4837        active: 0_u32,
4838        actuator: [0.0_f32; 32usize],
4839    };
4840    #[cfg(feature = "arbitrary")]
4841    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4842        use arbitrary::{Arbitrary, Unstructured};
4843        let mut buf = [0u8; 1024];
4844        rng.fill_bytes(&mut buf);
4845        let mut unstructured = Unstructured::new(&buf);
4846        Self::arbitrary(&mut unstructured).unwrap_or_default()
4847    }
4848}
4849impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4850    fn default() -> Self {
4851        Self::DEFAULT.clone()
4852    }
4853}
4854impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4855    type Message = MavMessage;
4856    const ID: u32 = 375u32;
4857    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4858    const EXTRA_CRC: u8 = 251u8;
4859    const ENCODED_LEN: usize = 140usize;
4860    fn deser(
4861        _version: MavlinkVersion,
4862        __input: &[u8],
4863    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4864        let avail_len = __input.len();
4865        let mut payload_buf = [0; Self::ENCODED_LEN];
4866        let mut buf = if avail_len < Self::ENCODED_LEN {
4867            payload_buf[0..avail_len].copy_from_slice(__input);
4868            Bytes::new(&payload_buf)
4869        } else {
4870            Bytes::new(__input)
4871        };
4872        let mut __struct = Self::default();
4873        __struct.time_usec = buf.get_u64_le()?;
4874        __struct.active = buf.get_u32_le()?;
4875        for v in &mut __struct.actuator {
4876            let val = buf.get_f32_le()?;
4877            *v = val;
4878        }
4879        Ok(__struct)
4880    }
4881    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4882        let mut __tmp = BytesMut::new(bytes);
4883        #[allow(clippy::absurd_extreme_comparisons)]
4884        #[allow(unused_comparisons)]
4885        if __tmp.remaining() < Self::ENCODED_LEN {
4886            panic!(
4887                "buffer is too small (need {} bytes, but got {})",
4888                Self::ENCODED_LEN,
4889                __tmp.remaining(),
4890            )
4891        }
4892        __tmp.put_u64_le(self.time_usec);
4893        __tmp.put_u32_le(self.active);
4894        for val in &self.actuator {
4895            __tmp.put_f32_le(*val);
4896        }
4897        if matches!(version, MavlinkVersion::V2) {
4898            let len = __tmp.len();
4899            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4900        } else {
4901            __tmp.len()
4902        }
4903    }
4904}
4905#[doc = "The location and information of an ADSB vehicle."]
4906#[doc = ""]
4907#[doc = "ID: 246"]
4908#[derive(Debug, Clone, PartialEq)]
4909#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4910#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4911#[cfg_attr(feature = "ts", derive(TS))]
4912#[cfg_attr(feature = "ts", ts(export))]
4913pub struct ADSB_VEHICLE_DATA {
4914    #[doc = "ICAO address"]
4915    pub ICAO_address: u32,
4916    #[doc = "Latitude"]
4917    pub lat: i32,
4918    #[doc = "Longitude"]
4919    pub lon: i32,
4920    #[doc = "Altitude(ASL)"]
4921    pub altitude: i32,
4922    #[doc = "Course over ground"]
4923    pub heading: u16,
4924    #[doc = "The horizontal velocity"]
4925    pub hor_velocity: u16,
4926    #[doc = "The vertical velocity. Positive is up"]
4927    pub ver_velocity: i16,
4928    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4929    pub flags: AdsbFlags,
4930    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4931    pub squawk: u16,
4932    #[doc = "ADSB altitude type."]
4933    pub altitude_type: AdsbAltitudeType,
4934    #[doc = "The callsign, 8+null"]
4935    #[cfg_attr(feature = "ts", ts(type = "string"))]
4936    pub callsign: CharArray<9>,
4937    #[doc = "ADSB emitter type."]
4938    pub emitter_type: AdsbEmitterType,
4939    #[doc = "Time since last communication in seconds"]
4940    pub tslc: u8,
4941}
4942impl ADSB_VEHICLE_DATA {
4943    pub const ENCODED_LEN: usize = 38usize;
4944    pub const DEFAULT: Self = Self {
4945        ICAO_address: 0_u32,
4946        lat: 0_i32,
4947        lon: 0_i32,
4948        altitude: 0_i32,
4949        heading: 0_u16,
4950        hor_velocity: 0_u16,
4951        ver_velocity: 0_i16,
4952        flags: AdsbFlags::DEFAULT,
4953        squawk: 0_u16,
4954        altitude_type: AdsbAltitudeType::DEFAULT,
4955        callsign: CharArray::new([0_u8; 9usize]),
4956        emitter_type: AdsbEmitterType::DEFAULT,
4957        tslc: 0_u8,
4958    };
4959    #[cfg(feature = "arbitrary")]
4960    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4961        use arbitrary::{Arbitrary, Unstructured};
4962        let mut buf = [0u8; 1024];
4963        rng.fill_bytes(&mut buf);
4964        let mut unstructured = Unstructured::new(&buf);
4965        Self::arbitrary(&mut unstructured).unwrap_or_default()
4966    }
4967}
4968impl Default for ADSB_VEHICLE_DATA {
4969    fn default() -> Self {
4970        Self::DEFAULT.clone()
4971    }
4972}
4973impl MessageData for ADSB_VEHICLE_DATA {
4974    type Message = MavMessage;
4975    const ID: u32 = 246u32;
4976    const NAME: &'static str = "ADSB_VEHICLE";
4977    const EXTRA_CRC: u8 = 184u8;
4978    const ENCODED_LEN: usize = 38usize;
4979    fn deser(
4980        _version: MavlinkVersion,
4981        __input: &[u8],
4982    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4983        let avail_len = __input.len();
4984        let mut payload_buf = [0; Self::ENCODED_LEN];
4985        let mut buf = if avail_len < Self::ENCODED_LEN {
4986            payload_buf[0..avail_len].copy_from_slice(__input);
4987            Bytes::new(&payload_buf)
4988        } else {
4989            Bytes::new(__input)
4990        };
4991        let mut __struct = Self::default();
4992        __struct.ICAO_address = buf.get_u32_le()?;
4993        __struct.lat = buf.get_i32_le()?;
4994        __struct.lon = buf.get_i32_le()?;
4995        __struct.altitude = buf.get_i32_le()?;
4996        __struct.heading = buf.get_u16_le()?;
4997        __struct.hor_velocity = buf.get_u16_le()?;
4998        __struct.ver_velocity = buf.get_i16_le()?;
4999        let tmp = buf.get_u16_le()?;
5000        __struct.flags = AdsbFlags::from_bits(tmp as <AdsbFlags as Flags>::Bits).ok_or(
5001            ::mavlink_core::error::ParserError::InvalidFlag {
5002                flag_type: "AdsbFlags",
5003                value: tmp as u64,
5004            },
5005        )?;
5006        __struct.squawk = buf.get_u16_le()?;
5007        let tmp = buf.get_u8()?;
5008        __struct.altitude_type =
5009            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5010                enum_type: "AdsbAltitudeType",
5011                value: tmp as u64,
5012            })?;
5013        let mut tmp = [0_u8; 9usize];
5014        for v in &mut tmp {
5015            *v = buf.get_u8()?;
5016        }
5017        __struct.callsign = CharArray::new(tmp);
5018        let tmp = buf.get_u8()?;
5019        __struct.emitter_type =
5020            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5021                enum_type: "AdsbEmitterType",
5022                value: tmp as u64,
5023            })?;
5024        __struct.tslc = buf.get_u8()?;
5025        Ok(__struct)
5026    }
5027    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5028        let mut __tmp = BytesMut::new(bytes);
5029        #[allow(clippy::absurd_extreme_comparisons)]
5030        #[allow(unused_comparisons)]
5031        if __tmp.remaining() < Self::ENCODED_LEN {
5032            panic!(
5033                "buffer is too small (need {} bytes, but got {})",
5034                Self::ENCODED_LEN,
5035                __tmp.remaining(),
5036            )
5037        }
5038        __tmp.put_u32_le(self.ICAO_address);
5039        __tmp.put_i32_le(self.lat);
5040        __tmp.put_i32_le(self.lon);
5041        __tmp.put_i32_le(self.altitude);
5042        __tmp.put_u16_le(self.heading);
5043        __tmp.put_u16_le(self.hor_velocity);
5044        __tmp.put_i16_le(self.ver_velocity);
5045        __tmp.put_u16_le(self.flags.bits() as u16);
5046        __tmp.put_u16_le(self.squawk);
5047        __tmp.put_u8(self.altitude_type as u8);
5048        for val in &self.callsign {
5049            __tmp.put_u8(*val);
5050        }
5051        __tmp.put_u8(self.emitter_type as u8);
5052        __tmp.put_u8(self.tslc);
5053        if matches!(version, MavlinkVersion::V2) {
5054            let len = __tmp.len();
5055            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5056        } else {
5057            __tmp.len()
5058        }
5059    }
5060}
5061#[doc = "The location and information of an AIS vessel."]
5062#[doc = ""]
5063#[doc = "ID: 301"]
5064#[derive(Debug, Clone, PartialEq)]
5065#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5066#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5067#[cfg_attr(feature = "ts", derive(TS))]
5068#[cfg_attr(feature = "ts", ts(export))]
5069pub struct AIS_VESSEL_DATA {
5070    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5071    pub MMSI: u32,
5072    #[doc = "Latitude"]
5073    pub lat: i32,
5074    #[doc = "Longitude"]
5075    pub lon: i32,
5076    #[doc = "Course over ground"]
5077    pub COG: u16,
5078    #[doc = "True heading"]
5079    pub heading: u16,
5080    #[doc = "Speed over ground"]
5081    pub velocity: u16,
5082    #[doc = "Distance from lat/lon location to bow"]
5083    pub dimension_bow: u16,
5084    #[doc = "Distance from lat/lon location to stern"]
5085    pub dimension_stern: u16,
5086    #[doc = "Time since last communication in seconds"]
5087    pub tslc: u16,
5088    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5089    pub flags: AisFlags,
5090    #[doc = "Turn rate"]
5091    pub turn_rate: i8,
5092    #[doc = "Navigational status"]
5093    pub navigational_status: AisNavStatus,
5094    #[doc = "Type of vessels"]
5095    pub mavtype: AisType,
5096    #[doc = "Distance from lat/lon location to port side"]
5097    pub dimension_port: u8,
5098    #[doc = "Distance from lat/lon location to starboard side"]
5099    pub dimension_starboard: u8,
5100    #[doc = "The vessel callsign"]
5101    #[cfg_attr(feature = "ts", ts(type = "string"))]
5102    pub callsign: CharArray<7>,
5103    #[doc = "The vessel name"]
5104    #[cfg_attr(feature = "ts", ts(type = "string"))]
5105    pub name: CharArray<20>,
5106}
5107impl AIS_VESSEL_DATA {
5108    pub const ENCODED_LEN: usize = 58usize;
5109    pub const DEFAULT: Self = Self {
5110        MMSI: 0_u32,
5111        lat: 0_i32,
5112        lon: 0_i32,
5113        COG: 0_u16,
5114        heading: 0_u16,
5115        velocity: 0_u16,
5116        dimension_bow: 0_u16,
5117        dimension_stern: 0_u16,
5118        tslc: 0_u16,
5119        flags: AisFlags::DEFAULT,
5120        turn_rate: 0_i8,
5121        navigational_status: AisNavStatus::DEFAULT,
5122        mavtype: AisType::DEFAULT,
5123        dimension_port: 0_u8,
5124        dimension_starboard: 0_u8,
5125        callsign: CharArray::new([0_u8; 7usize]),
5126        name: CharArray::new([0_u8; 20usize]),
5127    };
5128    #[cfg(feature = "arbitrary")]
5129    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5130        use arbitrary::{Arbitrary, Unstructured};
5131        let mut buf = [0u8; 1024];
5132        rng.fill_bytes(&mut buf);
5133        let mut unstructured = Unstructured::new(&buf);
5134        Self::arbitrary(&mut unstructured).unwrap_or_default()
5135    }
5136}
5137impl Default for AIS_VESSEL_DATA {
5138    fn default() -> Self {
5139        Self::DEFAULT.clone()
5140    }
5141}
5142impl MessageData for AIS_VESSEL_DATA {
5143    type Message = MavMessage;
5144    const ID: u32 = 301u32;
5145    const NAME: &'static str = "AIS_VESSEL";
5146    const EXTRA_CRC: u8 = 243u8;
5147    const ENCODED_LEN: usize = 58usize;
5148    fn deser(
5149        _version: MavlinkVersion,
5150        __input: &[u8],
5151    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5152        let avail_len = __input.len();
5153        let mut payload_buf = [0; Self::ENCODED_LEN];
5154        let mut buf = if avail_len < Self::ENCODED_LEN {
5155            payload_buf[0..avail_len].copy_from_slice(__input);
5156            Bytes::new(&payload_buf)
5157        } else {
5158            Bytes::new(__input)
5159        };
5160        let mut __struct = Self::default();
5161        __struct.MMSI = buf.get_u32_le()?;
5162        __struct.lat = buf.get_i32_le()?;
5163        __struct.lon = buf.get_i32_le()?;
5164        __struct.COG = buf.get_u16_le()?;
5165        __struct.heading = buf.get_u16_le()?;
5166        __struct.velocity = buf.get_u16_le()?;
5167        __struct.dimension_bow = buf.get_u16_le()?;
5168        __struct.dimension_stern = buf.get_u16_le()?;
5169        __struct.tslc = buf.get_u16_le()?;
5170        let tmp = buf.get_u16_le()?;
5171        __struct.flags = AisFlags::from_bits(tmp as <AisFlags as Flags>::Bits).ok_or(
5172            ::mavlink_core::error::ParserError::InvalidFlag {
5173                flag_type: "AisFlags",
5174                value: tmp as u64,
5175            },
5176        )?;
5177        __struct.turn_rate = buf.get_i8()?;
5178        let tmp = buf.get_u8()?;
5179        __struct.navigational_status =
5180            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5181                enum_type: "AisNavStatus",
5182                value: tmp as u64,
5183            })?;
5184        let tmp = buf.get_u8()?;
5185        __struct.mavtype =
5186            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5187                enum_type: "AisType",
5188                value: tmp as u64,
5189            })?;
5190        __struct.dimension_port = buf.get_u8()?;
5191        __struct.dimension_starboard = buf.get_u8()?;
5192        let mut tmp = [0_u8; 7usize];
5193        for v in &mut tmp {
5194            *v = buf.get_u8()?;
5195        }
5196        __struct.callsign = CharArray::new(tmp);
5197        let mut tmp = [0_u8; 20usize];
5198        for v in &mut tmp {
5199            *v = buf.get_u8()?;
5200        }
5201        __struct.name = CharArray::new(tmp);
5202        Ok(__struct)
5203    }
5204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5205        let mut __tmp = BytesMut::new(bytes);
5206        #[allow(clippy::absurd_extreme_comparisons)]
5207        #[allow(unused_comparisons)]
5208        if __tmp.remaining() < Self::ENCODED_LEN {
5209            panic!(
5210                "buffer is too small (need {} bytes, but got {})",
5211                Self::ENCODED_LEN,
5212                __tmp.remaining(),
5213            )
5214        }
5215        __tmp.put_u32_le(self.MMSI);
5216        __tmp.put_i32_le(self.lat);
5217        __tmp.put_i32_le(self.lon);
5218        __tmp.put_u16_le(self.COG);
5219        __tmp.put_u16_le(self.heading);
5220        __tmp.put_u16_le(self.velocity);
5221        __tmp.put_u16_le(self.dimension_bow);
5222        __tmp.put_u16_le(self.dimension_stern);
5223        __tmp.put_u16_le(self.tslc);
5224        __tmp.put_u16_le(self.flags.bits() as u16);
5225        __tmp.put_i8(self.turn_rate);
5226        __tmp.put_u8(self.navigational_status as u8);
5227        __tmp.put_u8(self.mavtype as u8);
5228        __tmp.put_u8(self.dimension_port);
5229        __tmp.put_u8(self.dimension_starboard);
5230        for val in &self.callsign {
5231            __tmp.put_u8(*val);
5232        }
5233        for val in &self.name {
5234            __tmp.put_u8(*val);
5235        }
5236        if matches!(version, MavlinkVersion::V2) {
5237            let len = __tmp.len();
5238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5239        } else {
5240            __tmp.len()
5241        }
5242    }
5243}
5244#[doc = "The current system altitude."]
5245#[doc = ""]
5246#[doc = "ID: 141"]
5247#[derive(Debug, Clone, PartialEq)]
5248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5250#[cfg_attr(feature = "ts", derive(TS))]
5251#[cfg_attr(feature = "ts", ts(export))]
5252pub struct ALTITUDE_DATA {
5253    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5254    pub time_usec: u64,
5255    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5256    pub altitude_monotonic: f32,
5257    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5258    pub altitude_amsl: f32,
5259    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5260    pub altitude_local: f32,
5261    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5262    pub altitude_relative: f32,
5263    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5264    pub altitude_terrain: f32,
5265    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5266    pub bottom_clearance: f32,
5267}
5268impl ALTITUDE_DATA {
5269    pub const ENCODED_LEN: usize = 32usize;
5270    pub const DEFAULT: Self = Self {
5271        time_usec: 0_u64,
5272        altitude_monotonic: 0.0_f32,
5273        altitude_amsl: 0.0_f32,
5274        altitude_local: 0.0_f32,
5275        altitude_relative: 0.0_f32,
5276        altitude_terrain: 0.0_f32,
5277        bottom_clearance: 0.0_f32,
5278    };
5279    #[cfg(feature = "arbitrary")]
5280    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5281        use arbitrary::{Arbitrary, Unstructured};
5282        let mut buf = [0u8; 1024];
5283        rng.fill_bytes(&mut buf);
5284        let mut unstructured = Unstructured::new(&buf);
5285        Self::arbitrary(&mut unstructured).unwrap_or_default()
5286    }
5287}
5288impl Default for ALTITUDE_DATA {
5289    fn default() -> Self {
5290        Self::DEFAULT.clone()
5291    }
5292}
5293impl MessageData for ALTITUDE_DATA {
5294    type Message = MavMessage;
5295    const ID: u32 = 141u32;
5296    const NAME: &'static str = "ALTITUDE";
5297    const EXTRA_CRC: u8 = 47u8;
5298    const ENCODED_LEN: usize = 32usize;
5299    fn deser(
5300        _version: MavlinkVersion,
5301        __input: &[u8],
5302    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5303        let avail_len = __input.len();
5304        let mut payload_buf = [0; Self::ENCODED_LEN];
5305        let mut buf = if avail_len < Self::ENCODED_LEN {
5306            payload_buf[0..avail_len].copy_from_slice(__input);
5307            Bytes::new(&payload_buf)
5308        } else {
5309            Bytes::new(__input)
5310        };
5311        let mut __struct = Self::default();
5312        __struct.time_usec = buf.get_u64_le()?;
5313        __struct.altitude_monotonic = buf.get_f32_le()?;
5314        __struct.altitude_amsl = buf.get_f32_le()?;
5315        __struct.altitude_local = buf.get_f32_le()?;
5316        __struct.altitude_relative = buf.get_f32_le()?;
5317        __struct.altitude_terrain = buf.get_f32_le()?;
5318        __struct.bottom_clearance = buf.get_f32_le()?;
5319        Ok(__struct)
5320    }
5321    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5322        let mut __tmp = BytesMut::new(bytes);
5323        #[allow(clippy::absurd_extreme_comparisons)]
5324        #[allow(unused_comparisons)]
5325        if __tmp.remaining() < Self::ENCODED_LEN {
5326            panic!(
5327                "buffer is too small (need {} bytes, but got {})",
5328                Self::ENCODED_LEN,
5329                __tmp.remaining(),
5330            )
5331        }
5332        __tmp.put_u64_le(self.time_usec);
5333        __tmp.put_f32_le(self.altitude_monotonic);
5334        __tmp.put_f32_le(self.altitude_amsl);
5335        __tmp.put_f32_le(self.altitude_local);
5336        __tmp.put_f32_le(self.altitude_relative);
5337        __tmp.put_f32_le(self.altitude_terrain);
5338        __tmp.put_f32_le(self.bottom_clearance);
5339        if matches!(version, MavlinkVersion::V2) {
5340            let len = __tmp.len();
5341            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5342        } else {
5343            __tmp.len()
5344        }
5345    }
5346}
5347#[doc = "ASL-fixed-wing controller data."]
5348#[doc = ""]
5349#[doc = "ID: 8004"]
5350#[derive(Debug, Clone, PartialEq)]
5351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5353#[cfg_attr(feature = "ts", derive(TS))]
5354#[cfg_attr(feature = "ts", ts(export))]
5355pub struct ASLCTRL_DATA_DATA {
5356    #[doc = "Timestamp"]
5357    pub timestamp: u64,
5358    #[doc = "See sourcecode for a description of these values..."]
5359    pub h: f32,
5360    pub hRef: f32,
5361    pub hRef_t: f32,
5362    #[doc = "Pitch angle"]
5363    pub PitchAngle: f32,
5364    #[doc = "Pitch angle reference"]
5365    pub PitchAngleRef: f32,
5366    pub q: f32,
5367    pub qRef: f32,
5368    pub uElev: f32,
5369    pub uThrot: f32,
5370    pub uThrot2: f32,
5371    pub nZ: f32,
5372    #[doc = "Airspeed reference"]
5373    pub AirspeedRef: f32,
5374    #[doc = "Yaw angle"]
5375    pub YawAngle: f32,
5376    #[doc = "Yaw angle reference"]
5377    pub YawAngleRef: f32,
5378    #[doc = "Roll angle"]
5379    pub RollAngle: f32,
5380    #[doc = "Roll angle reference"]
5381    pub RollAngleRef: f32,
5382    pub p: f32,
5383    pub pRef: f32,
5384    pub r: f32,
5385    pub rRef: f32,
5386    pub uAil: f32,
5387    pub uRud: f32,
5388    #[doc = "ASLCTRL control-mode (manual, stabilized, auto, etc...)"]
5389    pub aslctrl_mode: u8,
5390    pub SpoilersEngaged: u8,
5391}
5392impl ASLCTRL_DATA_DATA {
5393    pub const ENCODED_LEN: usize = 98usize;
5394    pub const DEFAULT: Self = Self {
5395        timestamp: 0_u64,
5396        h: 0.0_f32,
5397        hRef: 0.0_f32,
5398        hRef_t: 0.0_f32,
5399        PitchAngle: 0.0_f32,
5400        PitchAngleRef: 0.0_f32,
5401        q: 0.0_f32,
5402        qRef: 0.0_f32,
5403        uElev: 0.0_f32,
5404        uThrot: 0.0_f32,
5405        uThrot2: 0.0_f32,
5406        nZ: 0.0_f32,
5407        AirspeedRef: 0.0_f32,
5408        YawAngle: 0.0_f32,
5409        YawAngleRef: 0.0_f32,
5410        RollAngle: 0.0_f32,
5411        RollAngleRef: 0.0_f32,
5412        p: 0.0_f32,
5413        pRef: 0.0_f32,
5414        r: 0.0_f32,
5415        rRef: 0.0_f32,
5416        uAil: 0.0_f32,
5417        uRud: 0.0_f32,
5418        aslctrl_mode: 0_u8,
5419        SpoilersEngaged: 0_u8,
5420    };
5421    #[cfg(feature = "arbitrary")]
5422    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5423        use arbitrary::{Arbitrary, Unstructured};
5424        let mut buf = [0u8; 1024];
5425        rng.fill_bytes(&mut buf);
5426        let mut unstructured = Unstructured::new(&buf);
5427        Self::arbitrary(&mut unstructured).unwrap_or_default()
5428    }
5429}
5430impl Default for ASLCTRL_DATA_DATA {
5431    fn default() -> Self {
5432        Self::DEFAULT.clone()
5433    }
5434}
5435impl MessageData for ASLCTRL_DATA_DATA {
5436    type Message = MavMessage;
5437    const ID: u32 = 8004u32;
5438    const NAME: &'static str = "ASLCTRL_DATA";
5439    const EXTRA_CRC: u8 = 172u8;
5440    const ENCODED_LEN: usize = 98usize;
5441    fn deser(
5442        _version: MavlinkVersion,
5443        __input: &[u8],
5444    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5445        let avail_len = __input.len();
5446        let mut payload_buf = [0; Self::ENCODED_LEN];
5447        let mut buf = if avail_len < Self::ENCODED_LEN {
5448            payload_buf[0..avail_len].copy_from_slice(__input);
5449            Bytes::new(&payload_buf)
5450        } else {
5451            Bytes::new(__input)
5452        };
5453        let mut __struct = Self::default();
5454        __struct.timestamp = buf.get_u64_le()?;
5455        __struct.h = buf.get_f32_le()?;
5456        __struct.hRef = buf.get_f32_le()?;
5457        __struct.hRef_t = buf.get_f32_le()?;
5458        __struct.PitchAngle = buf.get_f32_le()?;
5459        __struct.PitchAngleRef = buf.get_f32_le()?;
5460        __struct.q = buf.get_f32_le()?;
5461        __struct.qRef = buf.get_f32_le()?;
5462        __struct.uElev = buf.get_f32_le()?;
5463        __struct.uThrot = buf.get_f32_le()?;
5464        __struct.uThrot2 = buf.get_f32_le()?;
5465        __struct.nZ = buf.get_f32_le()?;
5466        __struct.AirspeedRef = buf.get_f32_le()?;
5467        __struct.YawAngle = buf.get_f32_le()?;
5468        __struct.YawAngleRef = buf.get_f32_le()?;
5469        __struct.RollAngle = buf.get_f32_le()?;
5470        __struct.RollAngleRef = buf.get_f32_le()?;
5471        __struct.p = buf.get_f32_le()?;
5472        __struct.pRef = buf.get_f32_le()?;
5473        __struct.r = buf.get_f32_le()?;
5474        __struct.rRef = buf.get_f32_le()?;
5475        __struct.uAil = buf.get_f32_le()?;
5476        __struct.uRud = buf.get_f32_le()?;
5477        __struct.aslctrl_mode = buf.get_u8()?;
5478        __struct.SpoilersEngaged = buf.get_u8()?;
5479        Ok(__struct)
5480    }
5481    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5482        let mut __tmp = BytesMut::new(bytes);
5483        #[allow(clippy::absurd_extreme_comparisons)]
5484        #[allow(unused_comparisons)]
5485        if __tmp.remaining() < Self::ENCODED_LEN {
5486            panic!(
5487                "buffer is too small (need {} bytes, but got {})",
5488                Self::ENCODED_LEN,
5489                __tmp.remaining(),
5490            )
5491        }
5492        __tmp.put_u64_le(self.timestamp);
5493        __tmp.put_f32_le(self.h);
5494        __tmp.put_f32_le(self.hRef);
5495        __tmp.put_f32_le(self.hRef_t);
5496        __tmp.put_f32_le(self.PitchAngle);
5497        __tmp.put_f32_le(self.PitchAngleRef);
5498        __tmp.put_f32_le(self.q);
5499        __tmp.put_f32_le(self.qRef);
5500        __tmp.put_f32_le(self.uElev);
5501        __tmp.put_f32_le(self.uThrot);
5502        __tmp.put_f32_le(self.uThrot2);
5503        __tmp.put_f32_le(self.nZ);
5504        __tmp.put_f32_le(self.AirspeedRef);
5505        __tmp.put_f32_le(self.YawAngle);
5506        __tmp.put_f32_le(self.YawAngleRef);
5507        __tmp.put_f32_le(self.RollAngle);
5508        __tmp.put_f32_le(self.RollAngleRef);
5509        __tmp.put_f32_le(self.p);
5510        __tmp.put_f32_le(self.pRef);
5511        __tmp.put_f32_le(self.r);
5512        __tmp.put_f32_le(self.rRef);
5513        __tmp.put_f32_le(self.uAil);
5514        __tmp.put_f32_le(self.uRud);
5515        __tmp.put_u8(self.aslctrl_mode);
5516        __tmp.put_u8(self.SpoilersEngaged);
5517        if matches!(version, MavlinkVersion::V2) {
5518            let len = __tmp.len();
5519            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5520        } else {
5521            __tmp.len()
5522        }
5523    }
5524}
5525#[doc = "ASL-fixed-wing controller debug data."]
5526#[doc = ""]
5527#[doc = "ID: 8005"]
5528#[derive(Debug, Clone, PartialEq)]
5529#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5530#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5531#[cfg_attr(feature = "ts", derive(TS))]
5532#[cfg_attr(feature = "ts", ts(export))]
5533pub struct ASLCTRL_DEBUG_DATA {
5534    #[doc = "Debug data"]
5535    pub i32_1: u32,
5536    #[doc = "Debug data"]
5537    pub f_1: f32,
5538    #[doc = "Debug data"]
5539    pub f_2: f32,
5540    #[doc = "Debug data"]
5541    pub f_3: f32,
5542    #[doc = "Debug data"]
5543    pub f_4: f32,
5544    #[doc = "Debug data"]
5545    pub f_5: f32,
5546    #[doc = "Debug data"]
5547    pub f_6: f32,
5548    #[doc = "Debug data"]
5549    pub f_7: f32,
5550    #[doc = "Debug data"]
5551    pub f_8: f32,
5552    #[doc = "Debug data"]
5553    pub i8_1: u8,
5554    #[doc = "Debug data"]
5555    pub i8_2: u8,
5556}
5557impl ASLCTRL_DEBUG_DATA {
5558    pub const ENCODED_LEN: usize = 38usize;
5559    pub const DEFAULT: Self = Self {
5560        i32_1: 0_u32,
5561        f_1: 0.0_f32,
5562        f_2: 0.0_f32,
5563        f_3: 0.0_f32,
5564        f_4: 0.0_f32,
5565        f_5: 0.0_f32,
5566        f_6: 0.0_f32,
5567        f_7: 0.0_f32,
5568        f_8: 0.0_f32,
5569        i8_1: 0_u8,
5570        i8_2: 0_u8,
5571    };
5572    #[cfg(feature = "arbitrary")]
5573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5574        use arbitrary::{Arbitrary, Unstructured};
5575        let mut buf = [0u8; 1024];
5576        rng.fill_bytes(&mut buf);
5577        let mut unstructured = Unstructured::new(&buf);
5578        Self::arbitrary(&mut unstructured).unwrap_or_default()
5579    }
5580}
5581impl Default for ASLCTRL_DEBUG_DATA {
5582    fn default() -> Self {
5583        Self::DEFAULT.clone()
5584    }
5585}
5586impl MessageData for ASLCTRL_DEBUG_DATA {
5587    type Message = MavMessage;
5588    const ID: u32 = 8005u32;
5589    const NAME: &'static str = "ASLCTRL_DEBUG";
5590    const EXTRA_CRC: u8 = 251u8;
5591    const ENCODED_LEN: usize = 38usize;
5592    fn deser(
5593        _version: MavlinkVersion,
5594        __input: &[u8],
5595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5596        let avail_len = __input.len();
5597        let mut payload_buf = [0; Self::ENCODED_LEN];
5598        let mut buf = if avail_len < Self::ENCODED_LEN {
5599            payload_buf[0..avail_len].copy_from_slice(__input);
5600            Bytes::new(&payload_buf)
5601        } else {
5602            Bytes::new(__input)
5603        };
5604        let mut __struct = Self::default();
5605        __struct.i32_1 = buf.get_u32_le()?;
5606        __struct.f_1 = buf.get_f32_le()?;
5607        __struct.f_2 = buf.get_f32_le()?;
5608        __struct.f_3 = buf.get_f32_le()?;
5609        __struct.f_4 = buf.get_f32_le()?;
5610        __struct.f_5 = buf.get_f32_le()?;
5611        __struct.f_6 = buf.get_f32_le()?;
5612        __struct.f_7 = buf.get_f32_le()?;
5613        __struct.f_8 = buf.get_f32_le()?;
5614        __struct.i8_1 = buf.get_u8()?;
5615        __struct.i8_2 = buf.get_u8()?;
5616        Ok(__struct)
5617    }
5618    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5619        let mut __tmp = BytesMut::new(bytes);
5620        #[allow(clippy::absurd_extreme_comparisons)]
5621        #[allow(unused_comparisons)]
5622        if __tmp.remaining() < Self::ENCODED_LEN {
5623            panic!(
5624                "buffer is too small (need {} bytes, but got {})",
5625                Self::ENCODED_LEN,
5626                __tmp.remaining(),
5627            )
5628        }
5629        __tmp.put_u32_le(self.i32_1);
5630        __tmp.put_f32_le(self.f_1);
5631        __tmp.put_f32_le(self.f_2);
5632        __tmp.put_f32_le(self.f_3);
5633        __tmp.put_f32_le(self.f_4);
5634        __tmp.put_f32_le(self.f_5);
5635        __tmp.put_f32_le(self.f_6);
5636        __tmp.put_f32_le(self.f_7);
5637        __tmp.put_f32_le(self.f_8);
5638        __tmp.put_u8(self.i8_1);
5639        __tmp.put_u8(self.i8_2);
5640        if matches!(version, MavlinkVersion::V2) {
5641            let len = __tmp.len();
5642            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5643        } else {
5644            __tmp.len()
5645        }
5646    }
5647}
5648#[doc = "Extended state information for ASLUAVs."]
5649#[doc = ""]
5650#[doc = "ID: 8006"]
5651#[derive(Debug, Clone, PartialEq)]
5652#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5654#[cfg_attr(feature = "ts", derive(TS))]
5655#[cfg_attr(feature = "ts", ts(export))]
5656pub struct ASLUAV_STATUS_DATA {
5657    #[doc = "Motor RPM"]
5658    pub Motor_rpm: f32,
5659    #[doc = "Status of the position-indicator LEDs"]
5660    pub LED_status: u8,
5661    #[doc = "Status of the IRIDIUM satellite communication system"]
5662    pub SATCOM_status: u8,
5663    #[doc = "Status vector for up to 8 servos"]
5664    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5665    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5666    pub Servo_status: [u8; 8],
5667}
5668impl ASLUAV_STATUS_DATA {
5669    pub const ENCODED_LEN: usize = 14usize;
5670    pub const DEFAULT: Self = Self {
5671        Motor_rpm: 0.0_f32,
5672        LED_status: 0_u8,
5673        SATCOM_status: 0_u8,
5674        Servo_status: [0_u8; 8usize],
5675    };
5676    #[cfg(feature = "arbitrary")]
5677    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5678        use arbitrary::{Arbitrary, Unstructured};
5679        let mut buf = [0u8; 1024];
5680        rng.fill_bytes(&mut buf);
5681        let mut unstructured = Unstructured::new(&buf);
5682        Self::arbitrary(&mut unstructured).unwrap_or_default()
5683    }
5684}
5685impl Default for ASLUAV_STATUS_DATA {
5686    fn default() -> Self {
5687        Self::DEFAULT.clone()
5688    }
5689}
5690impl MessageData for ASLUAV_STATUS_DATA {
5691    type Message = MavMessage;
5692    const ID: u32 = 8006u32;
5693    const NAME: &'static str = "ASLUAV_STATUS";
5694    const EXTRA_CRC: u8 = 97u8;
5695    const ENCODED_LEN: usize = 14usize;
5696    fn deser(
5697        _version: MavlinkVersion,
5698        __input: &[u8],
5699    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5700        let avail_len = __input.len();
5701        let mut payload_buf = [0; Self::ENCODED_LEN];
5702        let mut buf = if avail_len < Self::ENCODED_LEN {
5703            payload_buf[0..avail_len].copy_from_slice(__input);
5704            Bytes::new(&payload_buf)
5705        } else {
5706            Bytes::new(__input)
5707        };
5708        let mut __struct = Self::default();
5709        __struct.Motor_rpm = buf.get_f32_le()?;
5710        __struct.LED_status = buf.get_u8()?;
5711        __struct.SATCOM_status = buf.get_u8()?;
5712        for v in &mut __struct.Servo_status {
5713            let val = buf.get_u8()?;
5714            *v = val;
5715        }
5716        Ok(__struct)
5717    }
5718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5719        let mut __tmp = BytesMut::new(bytes);
5720        #[allow(clippy::absurd_extreme_comparisons)]
5721        #[allow(unused_comparisons)]
5722        if __tmp.remaining() < Self::ENCODED_LEN {
5723            panic!(
5724                "buffer is too small (need {} bytes, but got {})",
5725                Self::ENCODED_LEN,
5726                __tmp.remaining(),
5727            )
5728        }
5729        __tmp.put_f32_le(self.Motor_rpm);
5730        __tmp.put_u8(self.LED_status);
5731        __tmp.put_u8(self.SATCOM_status);
5732        for val in &self.Servo_status {
5733            __tmp.put_u8(*val);
5734        }
5735        if matches!(version, MavlinkVersion::V2) {
5736            let len = __tmp.len();
5737            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5738        } else {
5739            __tmp.len()
5740        }
5741    }
5742}
5743#[doc = "Off-board controls/commands for ASLUAVs."]
5744#[doc = ""]
5745#[doc = "ID: 8008"]
5746#[derive(Debug, Clone, PartialEq)]
5747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5749#[cfg_attr(feature = "ts", derive(TS))]
5750#[cfg_attr(feature = "ts", ts(export))]
5751pub struct ASL_OBCTRL_DATA {
5752    #[doc = "Time since system start"]
5753    pub timestamp: u64,
5754    #[doc = "Elevator command [~]"]
5755    pub uElev: f32,
5756    #[doc = "Throttle command [~]"]
5757    pub uThrot: f32,
5758    #[doc = "Throttle 2 command [~]"]
5759    pub uThrot2: f32,
5760    #[doc = "Left aileron command [~]"]
5761    pub uAilL: f32,
5762    #[doc = "Right aileron command [~]"]
5763    pub uAilR: f32,
5764    #[doc = "Rudder command [~]"]
5765    pub uRud: f32,
5766    #[doc = "Off-board computer status"]
5767    pub obctrl_status: u8,
5768}
5769impl ASL_OBCTRL_DATA {
5770    pub const ENCODED_LEN: usize = 33usize;
5771    pub const DEFAULT: Self = Self {
5772        timestamp: 0_u64,
5773        uElev: 0.0_f32,
5774        uThrot: 0.0_f32,
5775        uThrot2: 0.0_f32,
5776        uAilL: 0.0_f32,
5777        uAilR: 0.0_f32,
5778        uRud: 0.0_f32,
5779        obctrl_status: 0_u8,
5780    };
5781    #[cfg(feature = "arbitrary")]
5782    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5783        use arbitrary::{Arbitrary, Unstructured};
5784        let mut buf = [0u8; 1024];
5785        rng.fill_bytes(&mut buf);
5786        let mut unstructured = Unstructured::new(&buf);
5787        Self::arbitrary(&mut unstructured).unwrap_or_default()
5788    }
5789}
5790impl Default for ASL_OBCTRL_DATA {
5791    fn default() -> Self {
5792        Self::DEFAULT.clone()
5793    }
5794}
5795impl MessageData for ASL_OBCTRL_DATA {
5796    type Message = MavMessage;
5797    const ID: u32 = 8008u32;
5798    const NAME: &'static str = "ASL_OBCTRL";
5799    const EXTRA_CRC: u8 = 234u8;
5800    const ENCODED_LEN: usize = 33usize;
5801    fn deser(
5802        _version: MavlinkVersion,
5803        __input: &[u8],
5804    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5805        let avail_len = __input.len();
5806        let mut payload_buf = [0; Self::ENCODED_LEN];
5807        let mut buf = if avail_len < Self::ENCODED_LEN {
5808            payload_buf[0..avail_len].copy_from_slice(__input);
5809            Bytes::new(&payload_buf)
5810        } else {
5811            Bytes::new(__input)
5812        };
5813        let mut __struct = Self::default();
5814        __struct.timestamp = buf.get_u64_le()?;
5815        __struct.uElev = buf.get_f32_le()?;
5816        __struct.uThrot = buf.get_f32_le()?;
5817        __struct.uThrot2 = buf.get_f32_le()?;
5818        __struct.uAilL = buf.get_f32_le()?;
5819        __struct.uAilR = buf.get_f32_le()?;
5820        __struct.uRud = buf.get_f32_le()?;
5821        __struct.obctrl_status = buf.get_u8()?;
5822        Ok(__struct)
5823    }
5824    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5825        let mut __tmp = BytesMut::new(bytes);
5826        #[allow(clippy::absurd_extreme_comparisons)]
5827        #[allow(unused_comparisons)]
5828        if __tmp.remaining() < Self::ENCODED_LEN {
5829            panic!(
5830                "buffer is too small (need {} bytes, but got {})",
5831                Self::ENCODED_LEN,
5832                __tmp.remaining(),
5833            )
5834        }
5835        __tmp.put_u64_le(self.timestamp);
5836        __tmp.put_f32_le(self.uElev);
5837        __tmp.put_f32_le(self.uThrot);
5838        __tmp.put_f32_le(self.uThrot2);
5839        __tmp.put_f32_le(self.uAilL);
5840        __tmp.put_f32_le(self.uAilR);
5841        __tmp.put_f32_le(self.uRud);
5842        __tmp.put_u8(self.obctrl_status);
5843        if matches!(version, MavlinkVersion::V2) {
5844            let len = __tmp.len();
5845            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5846        } else {
5847            __tmp.len()
5848        }
5849    }
5850}
5851#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5852#[doc = ""]
5853#[doc = "ID: 30"]
5854#[derive(Debug, Clone, PartialEq)]
5855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5857#[cfg_attr(feature = "ts", derive(TS))]
5858#[cfg_attr(feature = "ts", ts(export))]
5859pub struct ATTITUDE_DATA {
5860    #[doc = "Timestamp (time since system boot)."]
5861    pub time_boot_ms: u32,
5862    #[doc = "Roll angle (-pi..+pi)"]
5863    pub roll: f32,
5864    #[doc = "Pitch angle (-pi..+pi)"]
5865    pub pitch: f32,
5866    #[doc = "Yaw angle (-pi..+pi)"]
5867    pub yaw: f32,
5868    #[doc = "Roll angular speed"]
5869    pub rollspeed: f32,
5870    #[doc = "Pitch angular speed"]
5871    pub pitchspeed: f32,
5872    #[doc = "Yaw angular speed"]
5873    pub yawspeed: f32,
5874}
5875impl ATTITUDE_DATA {
5876    pub const ENCODED_LEN: usize = 28usize;
5877    pub const DEFAULT: Self = Self {
5878        time_boot_ms: 0_u32,
5879        roll: 0.0_f32,
5880        pitch: 0.0_f32,
5881        yaw: 0.0_f32,
5882        rollspeed: 0.0_f32,
5883        pitchspeed: 0.0_f32,
5884        yawspeed: 0.0_f32,
5885    };
5886    #[cfg(feature = "arbitrary")]
5887    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5888        use arbitrary::{Arbitrary, Unstructured};
5889        let mut buf = [0u8; 1024];
5890        rng.fill_bytes(&mut buf);
5891        let mut unstructured = Unstructured::new(&buf);
5892        Self::arbitrary(&mut unstructured).unwrap_or_default()
5893    }
5894}
5895impl Default for ATTITUDE_DATA {
5896    fn default() -> Self {
5897        Self::DEFAULT.clone()
5898    }
5899}
5900impl MessageData for ATTITUDE_DATA {
5901    type Message = MavMessage;
5902    const ID: u32 = 30u32;
5903    const NAME: &'static str = "ATTITUDE";
5904    const EXTRA_CRC: u8 = 39u8;
5905    const ENCODED_LEN: usize = 28usize;
5906    fn deser(
5907        _version: MavlinkVersion,
5908        __input: &[u8],
5909    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5910        let avail_len = __input.len();
5911        let mut payload_buf = [0; Self::ENCODED_LEN];
5912        let mut buf = if avail_len < Self::ENCODED_LEN {
5913            payload_buf[0..avail_len].copy_from_slice(__input);
5914            Bytes::new(&payload_buf)
5915        } else {
5916            Bytes::new(__input)
5917        };
5918        let mut __struct = Self::default();
5919        __struct.time_boot_ms = buf.get_u32_le()?;
5920        __struct.roll = buf.get_f32_le()?;
5921        __struct.pitch = buf.get_f32_le()?;
5922        __struct.yaw = buf.get_f32_le()?;
5923        __struct.rollspeed = buf.get_f32_le()?;
5924        __struct.pitchspeed = buf.get_f32_le()?;
5925        __struct.yawspeed = buf.get_f32_le()?;
5926        Ok(__struct)
5927    }
5928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5929        let mut __tmp = BytesMut::new(bytes);
5930        #[allow(clippy::absurd_extreme_comparisons)]
5931        #[allow(unused_comparisons)]
5932        if __tmp.remaining() < Self::ENCODED_LEN {
5933            panic!(
5934                "buffer is too small (need {} bytes, but got {})",
5935                Self::ENCODED_LEN,
5936                __tmp.remaining(),
5937            )
5938        }
5939        __tmp.put_u32_le(self.time_boot_ms);
5940        __tmp.put_f32_le(self.roll);
5941        __tmp.put_f32_le(self.pitch);
5942        __tmp.put_f32_le(self.yaw);
5943        __tmp.put_f32_le(self.rollspeed);
5944        __tmp.put_f32_le(self.pitchspeed);
5945        __tmp.put_f32_le(self.yawspeed);
5946        if matches!(version, MavlinkVersion::V2) {
5947            let len = __tmp.len();
5948            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5949        } else {
5950            __tmp.len()
5951        }
5952    }
5953}
5954#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5955#[doc = ""]
5956#[doc = "ID: 31"]
5957#[derive(Debug, Clone, PartialEq)]
5958#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5959#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5960#[cfg_attr(feature = "ts", derive(TS))]
5961#[cfg_attr(feature = "ts", ts(export))]
5962pub struct ATTITUDE_QUATERNION_DATA {
5963    #[doc = "Timestamp (time since system boot)."]
5964    pub time_boot_ms: u32,
5965    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5966    pub q1: f32,
5967    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5968    pub q2: f32,
5969    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5970    pub q3: f32,
5971    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5972    pub q4: f32,
5973    #[doc = "Roll angular speed"]
5974    pub rollspeed: f32,
5975    #[doc = "Pitch angular speed"]
5976    pub pitchspeed: f32,
5977    #[doc = "Yaw angular speed"]
5978    pub yawspeed: f32,
5979    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5980    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5981    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5982    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5983    pub repr_offset_q: [f32; 4],
5984}
5985impl ATTITUDE_QUATERNION_DATA {
5986    pub const ENCODED_LEN: usize = 48usize;
5987    pub const DEFAULT: Self = Self {
5988        time_boot_ms: 0_u32,
5989        q1: 0.0_f32,
5990        q2: 0.0_f32,
5991        q3: 0.0_f32,
5992        q4: 0.0_f32,
5993        rollspeed: 0.0_f32,
5994        pitchspeed: 0.0_f32,
5995        yawspeed: 0.0_f32,
5996        repr_offset_q: [0.0_f32; 4usize],
5997    };
5998    #[cfg(feature = "arbitrary")]
5999    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6000        use arbitrary::{Arbitrary, Unstructured};
6001        let mut buf = [0u8; 1024];
6002        rng.fill_bytes(&mut buf);
6003        let mut unstructured = Unstructured::new(&buf);
6004        Self::arbitrary(&mut unstructured).unwrap_or_default()
6005    }
6006}
6007impl Default for ATTITUDE_QUATERNION_DATA {
6008    fn default() -> Self {
6009        Self::DEFAULT.clone()
6010    }
6011}
6012impl MessageData for ATTITUDE_QUATERNION_DATA {
6013    type Message = MavMessage;
6014    const ID: u32 = 31u32;
6015    const NAME: &'static str = "ATTITUDE_QUATERNION";
6016    const EXTRA_CRC: u8 = 246u8;
6017    const ENCODED_LEN: usize = 48usize;
6018    fn deser(
6019        _version: MavlinkVersion,
6020        __input: &[u8],
6021    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6022        let avail_len = __input.len();
6023        let mut payload_buf = [0; Self::ENCODED_LEN];
6024        let mut buf = if avail_len < Self::ENCODED_LEN {
6025            payload_buf[0..avail_len].copy_from_slice(__input);
6026            Bytes::new(&payload_buf)
6027        } else {
6028            Bytes::new(__input)
6029        };
6030        let mut __struct = Self::default();
6031        __struct.time_boot_ms = buf.get_u32_le()?;
6032        __struct.q1 = buf.get_f32_le()?;
6033        __struct.q2 = buf.get_f32_le()?;
6034        __struct.q3 = buf.get_f32_le()?;
6035        __struct.q4 = buf.get_f32_le()?;
6036        __struct.rollspeed = buf.get_f32_le()?;
6037        __struct.pitchspeed = buf.get_f32_le()?;
6038        __struct.yawspeed = buf.get_f32_le()?;
6039        for v in &mut __struct.repr_offset_q {
6040            let val = buf.get_f32_le()?;
6041            *v = val;
6042        }
6043        Ok(__struct)
6044    }
6045    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6046        let mut __tmp = BytesMut::new(bytes);
6047        #[allow(clippy::absurd_extreme_comparisons)]
6048        #[allow(unused_comparisons)]
6049        if __tmp.remaining() < Self::ENCODED_LEN {
6050            panic!(
6051                "buffer is too small (need {} bytes, but got {})",
6052                Self::ENCODED_LEN,
6053                __tmp.remaining(),
6054            )
6055        }
6056        __tmp.put_u32_le(self.time_boot_ms);
6057        __tmp.put_f32_le(self.q1);
6058        __tmp.put_f32_le(self.q2);
6059        __tmp.put_f32_le(self.q3);
6060        __tmp.put_f32_le(self.q4);
6061        __tmp.put_f32_le(self.rollspeed);
6062        __tmp.put_f32_le(self.pitchspeed);
6063        __tmp.put_f32_le(self.yawspeed);
6064        if matches!(version, MavlinkVersion::V2) {
6065            for val in &self.repr_offset_q {
6066                __tmp.put_f32_le(*val);
6067            }
6068            let len = __tmp.len();
6069            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6070        } else {
6071            __tmp.len()
6072        }
6073    }
6074}
6075#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
6076#[doc = ""]
6077#[doc = "ID: 61"]
6078#[derive(Debug, Clone, PartialEq)]
6079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6080#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6081#[cfg_attr(feature = "ts", derive(TS))]
6082#[cfg_attr(feature = "ts", ts(export))]
6083pub struct ATTITUDE_QUATERNION_COV_DATA {
6084    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6085    pub time_usec: u64,
6086    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
6087    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6088    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6089    pub q: [f32; 4],
6090    #[doc = "Roll angular speed"]
6091    pub rollspeed: f32,
6092    #[doc = "Pitch angular speed"]
6093    pub pitchspeed: f32,
6094    #[doc = "Yaw angular speed"]
6095    pub yawspeed: f32,
6096    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
6097    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6098    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6099    pub covariance: [f32; 9],
6100}
6101impl ATTITUDE_QUATERNION_COV_DATA {
6102    pub const ENCODED_LEN: usize = 72usize;
6103    pub const DEFAULT: Self = Self {
6104        time_usec: 0_u64,
6105        q: [0.0_f32; 4usize],
6106        rollspeed: 0.0_f32,
6107        pitchspeed: 0.0_f32,
6108        yawspeed: 0.0_f32,
6109        covariance: [0.0_f32; 9usize],
6110    };
6111    #[cfg(feature = "arbitrary")]
6112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6113        use arbitrary::{Arbitrary, Unstructured};
6114        let mut buf = [0u8; 1024];
6115        rng.fill_bytes(&mut buf);
6116        let mut unstructured = Unstructured::new(&buf);
6117        Self::arbitrary(&mut unstructured).unwrap_or_default()
6118    }
6119}
6120impl Default for ATTITUDE_QUATERNION_COV_DATA {
6121    fn default() -> Self {
6122        Self::DEFAULT.clone()
6123    }
6124}
6125impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
6126    type Message = MavMessage;
6127    const ID: u32 = 61u32;
6128    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
6129    const EXTRA_CRC: u8 = 167u8;
6130    const ENCODED_LEN: usize = 72usize;
6131    fn deser(
6132        _version: MavlinkVersion,
6133        __input: &[u8],
6134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6135        let avail_len = __input.len();
6136        let mut payload_buf = [0; Self::ENCODED_LEN];
6137        let mut buf = if avail_len < Self::ENCODED_LEN {
6138            payload_buf[0..avail_len].copy_from_slice(__input);
6139            Bytes::new(&payload_buf)
6140        } else {
6141            Bytes::new(__input)
6142        };
6143        let mut __struct = Self::default();
6144        __struct.time_usec = buf.get_u64_le()?;
6145        for v in &mut __struct.q {
6146            let val = buf.get_f32_le()?;
6147            *v = val;
6148        }
6149        __struct.rollspeed = buf.get_f32_le()?;
6150        __struct.pitchspeed = buf.get_f32_le()?;
6151        __struct.yawspeed = buf.get_f32_le()?;
6152        for v in &mut __struct.covariance {
6153            let val = buf.get_f32_le()?;
6154            *v = val;
6155        }
6156        Ok(__struct)
6157    }
6158    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6159        let mut __tmp = BytesMut::new(bytes);
6160        #[allow(clippy::absurd_extreme_comparisons)]
6161        #[allow(unused_comparisons)]
6162        if __tmp.remaining() < Self::ENCODED_LEN {
6163            panic!(
6164                "buffer is too small (need {} bytes, but got {})",
6165                Self::ENCODED_LEN,
6166                __tmp.remaining(),
6167            )
6168        }
6169        __tmp.put_u64_le(self.time_usec);
6170        for val in &self.q {
6171            __tmp.put_f32_le(*val);
6172        }
6173        __tmp.put_f32_le(self.rollspeed);
6174        __tmp.put_f32_le(self.pitchspeed);
6175        __tmp.put_f32_le(self.yawspeed);
6176        for val in &self.covariance {
6177            __tmp.put_f32_le(*val);
6178        }
6179        if matches!(version, MavlinkVersion::V2) {
6180            let len = __tmp.len();
6181            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6182        } else {
6183            __tmp.len()
6184        }
6185    }
6186}
6187#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
6188#[doc = ""]
6189#[doc = "ID: 83"]
6190#[derive(Debug, Clone, PartialEq)]
6191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6192#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6193#[cfg_attr(feature = "ts", derive(TS))]
6194#[cfg_attr(feature = "ts", ts(export))]
6195pub struct ATTITUDE_TARGET_DATA {
6196    #[doc = "Timestamp (time since system boot)."]
6197    pub time_boot_ms: u32,
6198    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6199    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6200    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6201    pub q: [f32; 4],
6202    #[doc = "Body roll rate"]
6203    pub body_roll_rate: f32,
6204    #[doc = "Body pitch rate"]
6205    pub body_pitch_rate: f32,
6206    #[doc = "Body yaw rate"]
6207    pub body_yaw_rate: f32,
6208    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
6209    pub thrust: f32,
6210    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
6211    pub type_mask: AttitudeTargetTypemask,
6212}
6213impl ATTITUDE_TARGET_DATA {
6214    pub const ENCODED_LEN: usize = 37usize;
6215    pub const DEFAULT: Self = Self {
6216        time_boot_ms: 0_u32,
6217        q: [0.0_f32; 4usize],
6218        body_roll_rate: 0.0_f32,
6219        body_pitch_rate: 0.0_f32,
6220        body_yaw_rate: 0.0_f32,
6221        thrust: 0.0_f32,
6222        type_mask: AttitudeTargetTypemask::DEFAULT,
6223    };
6224    #[cfg(feature = "arbitrary")]
6225    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6226        use arbitrary::{Arbitrary, Unstructured};
6227        let mut buf = [0u8; 1024];
6228        rng.fill_bytes(&mut buf);
6229        let mut unstructured = Unstructured::new(&buf);
6230        Self::arbitrary(&mut unstructured).unwrap_or_default()
6231    }
6232}
6233impl Default for ATTITUDE_TARGET_DATA {
6234    fn default() -> Self {
6235        Self::DEFAULT.clone()
6236    }
6237}
6238impl MessageData for ATTITUDE_TARGET_DATA {
6239    type Message = MavMessage;
6240    const ID: u32 = 83u32;
6241    const NAME: &'static str = "ATTITUDE_TARGET";
6242    const EXTRA_CRC: u8 = 22u8;
6243    const ENCODED_LEN: usize = 37usize;
6244    fn deser(
6245        _version: MavlinkVersion,
6246        __input: &[u8],
6247    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6248        let avail_len = __input.len();
6249        let mut payload_buf = [0; Self::ENCODED_LEN];
6250        let mut buf = if avail_len < Self::ENCODED_LEN {
6251            payload_buf[0..avail_len].copy_from_slice(__input);
6252            Bytes::new(&payload_buf)
6253        } else {
6254            Bytes::new(__input)
6255        };
6256        let mut __struct = Self::default();
6257        __struct.time_boot_ms = buf.get_u32_le()?;
6258        for v in &mut __struct.q {
6259            let val = buf.get_f32_le()?;
6260            *v = val;
6261        }
6262        __struct.body_roll_rate = buf.get_f32_le()?;
6263        __struct.body_pitch_rate = buf.get_f32_le()?;
6264        __struct.body_yaw_rate = buf.get_f32_le()?;
6265        __struct.thrust = buf.get_f32_le()?;
6266        let tmp = buf.get_u8()?;
6267        __struct.type_mask =
6268            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
6269                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6270                    flag_type: "AttitudeTargetTypemask",
6271                    value: tmp as u64,
6272                })?;
6273        Ok(__struct)
6274    }
6275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6276        let mut __tmp = BytesMut::new(bytes);
6277        #[allow(clippy::absurd_extreme_comparisons)]
6278        #[allow(unused_comparisons)]
6279        if __tmp.remaining() < Self::ENCODED_LEN {
6280            panic!(
6281                "buffer is too small (need {} bytes, but got {})",
6282                Self::ENCODED_LEN,
6283                __tmp.remaining(),
6284            )
6285        }
6286        __tmp.put_u32_le(self.time_boot_ms);
6287        for val in &self.q {
6288            __tmp.put_f32_le(*val);
6289        }
6290        __tmp.put_f32_le(self.body_roll_rate);
6291        __tmp.put_f32_le(self.body_pitch_rate);
6292        __tmp.put_f32_le(self.body_yaw_rate);
6293        __tmp.put_f32_le(self.thrust);
6294        __tmp.put_u8(self.type_mask.bits() as u8);
6295        if matches!(version, MavlinkVersion::V2) {
6296            let len = __tmp.len();
6297            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6298        } else {
6299            __tmp.len()
6300        }
6301    }
6302}
6303#[doc = "Motion capture attitude and position."]
6304#[doc = ""]
6305#[doc = "ID: 138"]
6306#[derive(Debug, Clone, PartialEq)]
6307#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6308#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6309#[cfg_attr(feature = "ts", derive(TS))]
6310#[cfg_attr(feature = "ts", ts(export))]
6311pub struct ATT_POS_MOCAP_DATA {
6312    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6313    pub time_usec: u64,
6314    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6315    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6316    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6317    pub q: [f32; 4],
6318    #[doc = "X position (NED)"]
6319    pub x: f32,
6320    #[doc = "Y position (NED)"]
6321    pub y: f32,
6322    #[doc = "Z position (NED)"]
6323    pub z: f32,
6324    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6325    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6326    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6327    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6328    pub covariance: [f32; 21],
6329}
6330impl ATT_POS_MOCAP_DATA {
6331    pub const ENCODED_LEN: usize = 120usize;
6332    pub const DEFAULT: Self = Self {
6333        time_usec: 0_u64,
6334        q: [0.0_f32; 4usize],
6335        x: 0.0_f32,
6336        y: 0.0_f32,
6337        z: 0.0_f32,
6338        covariance: [0.0_f32; 21usize],
6339    };
6340    #[cfg(feature = "arbitrary")]
6341    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6342        use arbitrary::{Arbitrary, Unstructured};
6343        let mut buf = [0u8; 1024];
6344        rng.fill_bytes(&mut buf);
6345        let mut unstructured = Unstructured::new(&buf);
6346        Self::arbitrary(&mut unstructured).unwrap_or_default()
6347    }
6348}
6349impl Default for ATT_POS_MOCAP_DATA {
6350    fn default() -> Self {
6351        Self::DEFAULT.clone()
6352    }
6353}
6354impl MessageData for ATT_POS_MOCAP_DATA {
6355    type Message = MavMessage;
6356    const ID: u32 = 138u32;
6357    const NAME: &'static str = "ATT_POS_MOCAP";
6358    const EXTRA_CRC: u8 = 109u8;
6359    const ENCODED_LEN: usize = 120usize;
6360    fn deser(
6361        _version: MavlinkVersion,
6362        __input: &[u8],
6363    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6364        let avail_len = __input.len();
6365        let mut payload_buf = [0; Self::ENCODED_LEN];
6366        let mut buf = if avail_len < Self::ENCODED_LEN {
6367            payload_buf[0..avail_len].copy_from_slice(__input);
6368            Bytes::new(&payload_buf)
6369        } else {
6370            Bytes::new(__input)
6371        };
6372        let mut __struct = Self::default();
6373        __struct.time_usec = buf.get_u64_le()?;
6374        for v in &mut __struct.q {
6375            let val = buf.get_f32_le()?;
6376            *v = val;
6377        }
6378        __struct.x = buf.get_f32_le()?;
6379        __struct.y = buf.get_f32_le()?;
6380        __struct.z = buf.get_f32_le()?;
6381        for v in &mut __struct.covariance {
6382            let val = buf.get_f32_le()?;
6383            *v = val;
6384        }
6385        Ok(__struct)
6386    }
6387    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6388        let mut __tmp = BytesMut::new(bytes);
6389        #[allow(clippy::absurd_extreme_comparisons)]
6390        #[allow(unused_comparisons)]
6391        if __tmp.remaining() < Self::ENCODED_LEN {
6392            panic!(
6393                "buffer is too small (need {} bytes, but got {})",
6394                Self::ENCODED_LEN,
6395                __tmp.remaining(),
6396            )
6397        }
6398        __tmp.put_u64_le(self.time_usec);
6399        for val in &self.q {
6400            __tmp.put_f32_le(*val);
6401        }
6402        __tmp.put_f32_le(self.x);
6403        __tmp.put_f32_le(self.y);
6404        __tmp.put_f32_le(self.z);
6405        if matches!(version, MavlinkVersion::V2) {
6406            for val in &self.covariance {
6407                __tmp.put_f32_le(*val);
6408            }
6409            let len = __tmp.len();
6410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6411        } else {
6412            __tmp.len()
6413        }
6414    }
6415}
6416#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
6417#[doc = ""]
6418#[doc = "ID: 7"]
6419#[derive(Debug, Clone, PartialEq)]
6420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6422#[cfg_attr(feature = "ts", derive(TS))]
6423#[cfg_attr(feature = "ts", ts(export))]
6424pub struct AUTH_KEY_DATA {
6425    #[doc = "key"]
6426    #[cfg_attr(feature = "ts", ts(type = "string"))]
6427    pub key: CharArray<32>,
6428}
6429impl AUTH_KEY_DATA {
6430    pub const ENCODED_LEN: usize = 32usize;
6431    pub const DEFAULT: Self = Self {
6432        key: CharArray::new([0_u8; 32usize]),
6433    };
6434    #[cfg(feature = "arbitrary")]
6435    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6436        use arbitrary::{Arbitrary, Unstructured};
6437        let mut buf = [0u8; 1024];
6438        rng.fill_bytes(&mut buf);
6439        let mut unstructured = Unstructured::new(&buf);
6440        Self::arbitrary(&mut unstructured).unwrap_or_default()
6441    }
6442}
6443impl Default for AUTH_KEY_DATA {
6444    fn default() -> Self {
6445        Self::DEFAULT.clone()
6446    }
6447}
6448impl MessageData for AUTH_KEY_DATA {
6449    type Message = MavMessage;
6450    const ID: u32 = 7u32;
6451    const NAME: &'static str = "AUTH_KEY";
6452    const EXTRA_CRC: u8 = 119u8;
6453    const ENCODED_LEN: usize = 32usize;
6454    fn deser(
6455        _version: MavlinkVersion,
6456        __input: &[u8],
6457    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6458        let avail_len = __input.len();
6459        let mut payload_buf = [0; Self::ENCODED_LEN];
6460        let mut buf = if avail_len < Self::ENCODED_LEN {
6461            payload_buf[0..avail_len].copy_from_slice(__input);
6462            Bytes::new(&payload_buf)
6463        } else {
6464            Bytes::new(__input)
6465        };
6466        let mut __struct = Self::default();
6467        let mut tmp = [0_u8; 32usize];
6468        for v in &mut tmp {
6469            *v = buf.get_u8()?;
6470        }
6471        __struct.key = CharArray::new(tmp);
6472        Ok(__struct)
6473    }
6474    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6475        let mut __tmp = BytesMut::new(bytes);
6476        #[allow(clippy::absurd_extreme_comparisons)]
6477        #[allow(unused_comparisons)]
6478        if __tmp.remaining() < Self::ENCODED_LEN {
6479            panic!(
6480                "buffer is too small (need {} bytes, but got {})",
6481                Self::ENCODED_LEN,
6482                __tmp.remaining(),
6483            )
6484        }
6485        for val in &self.key {
6486            __tmp.put_u8(*val);
6487        }
6488        if matches!(version, MavlinkVersion::V2) {
6489            let len = __tmp.len();
6490            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6491        } else {
6492            __tmp.len()
6493        }
6494    }
6495}
6496#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6497#[doc = ""]
6498#[doc = "ID: 286"]
6499#[derive(Debug, Clone, PartialEq)]
6500#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6502#[cfg_attr(feature = "ts", derive(TS))]
6503#[cfg_attr(feature = "ts", ts(export))]
6504pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6505    #[doc = "Timestamp (time since system boot)."]
6506    pub time_boot_us: u64,
6507    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6508    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6509    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6510    pub q: [f32; 4],
6511    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6512    pub q_estimated_delay_us: u32,
6513    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6514    pub vx: f32,
6515    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6516    pub vy: f32,
6517    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6518    pub vz: f32,
6519    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6520    pub v_estimated_delay_us: u32,
6521    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6522    pub feed_forward_angular_velocity_z: f32,
6523    #[doc = "Bitmap indicating which estimator outputs are valid."]
6524    pub estimator_status: EstimatorStatusFlags,
6525    #[doc = "System ID"]
6526    pub target_system: u8,
6527    #[doc = "Component ID"]
6528    pub target_component: u8,
6529    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6530    pub landed_state: MavLandedState,
6531    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6532    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6533    pub angular_velocity_z: f32,
6534}
6535impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6536    pub const ENCODED_LEN: usize = 57usize;
6537    pub const DEFAULT: Self = Self {
6538        time_boot_us: 0_u64,
6539        q: [0.0_f32; 4usize],
6540        q_estimated_delay_us: 0_u32,
6541        vx: 0.0_f32,
6542        vy: 0.0_f32,
6543        vz: 0.0_f32,
6544        v_estimated_delay_us: 0_u32,
6545        feed_forward_angular_velocity_z: 0.0_f32,
6546        estimator_status: EstimatorStatusFlags::DEFAULT,
6547        target_system: 0_u8,
6548        target_component: 0_u8,
6549        landed_state: MavLandedState::DEFAULT,
6550        angular_velocity_z: 0.0_f32,
6551    };
6552    #[cfg(feature = "arbitrary")]
6553    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6554        use arbitrary::{Arbitrary, Unstructured};
6555        let mut buf = [0u8; 1024];
6556        rng.fill_bytes(&mut buf);
6557        let mut unstructured = Unstructured::new(&buf);
6558        Self::arbitrary(&mut unstructured).unwrap_or_default()
6559    }
6560}
6561impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6562    fn default() -> Self {
6563        Self::DEFAULT.clone()
6564    }
6565}
6566impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6567    type Message = MavMessage;
6568    const ID: u32 = 286u32;
6569    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6570    const EXTRA_CRC: u8 = 210u8;
6571    const ENCODED_LEN: usize = 57usize;
6572    fn deser(
6573        _version: MavlinkVersion,
6574        __input: &[u8],
6575    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6576        let avail_len = __input.len();
6577        let mut payload_buf = [0; Self::ENCODED_LEN];
6578        let mut buf = if avail_len < Self::ENCODED_LEN {
6579            payload_buf[0..avail_len].copy_from_slice(__input);
6580            Bytes::new(&payload_buf)
6581        } else {
6582            Bytes::new(__input)
6583        };
6584        let mut __struct = Self::default();
6585        __struct.time_boot_us = buf.get_u64_le()?;
6586        for v in &mut __struct.q {
6587            let val = buf.get_f32_le()?;
6588            *v = val;
6589        }
6590        __struct.q_estimated_delay_us = buf.get_u32_le()?;
6591        __struct.vx = buf.get_f32_le()?;
6592        __struct.vy = buf.get_f32_le()?;
6593        __struct.vz = buf.get_f32_le()?;
6594        __struct.v_estimated_delay_us = buf.get_u32_le()?;
6595        __struct.feed_forward_angular_velocity_z = buf.get_f32_le()?;
6596        let tmp = buf.get_u16_le()?;
6597        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6598            tmp as <EstimatorStatusFlags as Flags>::Bits,
6599        )
6600        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6601            flag_type: "EstimatorStatusFlags",
6602            value: tmp as u64,
6603        })?;
6604        __struct.target_system = buf.get_u8()?;
6605        __struct.target_component = buf.get_u8()?;
6606        let tmp = buf.get_u8()?;
6607        __struct.landed_state =
6608            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6609                enum_type: "MavLandedState",
6610                value: tmp as u64,
6611            })?;
6612        __struct.angular_velocity_z = buf.get_f32_le()?;
6613        Ok(__struct)
6614    }
6615    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6616        let mut __tmp = BytesMut::new(bytes);
6617        #[allow(clippy::absurd_extreme_comparisons)]
6618        #[allow(unused_comparisons)]
6619        if __tmp.remaining() < Self::ENCODED_LEN {
6620            panic!(
6621                "buffer is too small (need {} bytes, but got {})",
6622                Self::ENCODED_LEN,
6623                __tmp.remaining(),
6624            )
6625        }
6626        __tmp.put_u64_le(self.time_boot_us);
6627        for val in &self.q {
6628            __tmp.put_f32_le(*val);
6629        }
6630        __tmp.put_u32_le(self.q_estimated_delay_us);
6631        __tmp.put_f32_le(self.vx);
6632        __tmp.put_f32_le(self.vy);
6633        __tmp.put_f32_le(self.vz);
6634        __tmp.put_u32_le(self.v_estimated_delay_us);
6635        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6636        __tmp.put_u16_le(self.estimator_status.bits() as u16);
6637        __tmp.put_u8(self.target_system);
6638        __tmp.put_u8(self.target_component);
6639        __tmp.put_u8(self.landed_state as u8);
6640        if matches!(version, MavlinkVersion::V2) {
6641            __tmp.put_f32_le(self.angular_velocity_z);
6642            let len = __tmp.len();
6643            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6644        } else {
6645            __tmp.len()
6646        }
6647    }
6648}
6649#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6650#[doc = ""]
6651#[doc = "ID: 148"]
6652#[derive(Debug, Clone, PartialEq)]
6653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6654#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6655#[cfg_attr(feature = "ts", derive(TS))]
6656#[cfg_attr(feature = "ts", ts(export))]
6657pub struct AUTOPILOT_VERSION_DATA {
6658    #[doc = "Bitmap of capabilities"]
6659    pub capabilities: MavProtocolCapability,
6660    #[doc = "UID if provided by hardware (see uid2)"]
6661    pub uid: u64,
6662    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6663    pub flight_sw_version: u32,
6664    #[doc = "Middleware version number"]
6665    pub middleware_sw_version: u32,
6666    #[doc = "Operating system version number"]
6667    pub os_sw_version: u32,
6668    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6669    pub board_version: u32,
6670    #[doc = "ID of the board vendor"]
6671    pub vendor_id: u16,
6672    #[doc = "ID of the product"]
6673    pub product_id: u16,
6674    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6675    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6676    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6677    pub flight_custom_version: [u8; 8],
6678    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6679    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6680    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6681    pub middleware_custom_version: [u8; 8],
6682    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6683    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6684    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6685    pub os_custom_version: [u8; 8],
6686    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6687    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6688    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6689    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6690    pub uid2: [u8; 18],
6691}
6692impl AUTOPILOT_VERSION_DATA {
6693    pub const ENCODED_LEN: usize = 78usize;
6694    pub const DEFAULT: Self = Self {
6695        capabilities: MavProtocolCapability::DEFAULT,
6696        uid: 0_u64,
6697        flight_sw_version: 0_u32,
6698        middleware_sw_version: 0_u32,
6699        os_sw_version: 0_u32,
6700        board_version: 0_u32,
6701        vendor_id: 0_u16,
6702        product_id: 0_u16,
6703        flight_custom_version: [0_u8; 8usize],
6704        middleware_custom_version: [0_u8; 8usize],
6705        os_custom_version: [0_u8; 8usize],
6706        uid2: [0_u8; 18usize],
6707    };
6708    #[cfg(feature = "arbitrary")]
6709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6710        use arbitrary::{Arbitrary, Unstructured};
6711        let mut buf = [0u8; 1024];
6712        rng.fill_bytes(&mut buf);
6713        let mut unstructured = Unstructured::new(&buf);
6714        Self::arbitrary(&mut unstructured).unwrap_or_default()
6715    }
6716}
6717impl Default for AUTOPILOT_VERSION_DATA {
6718    fn default() -> Self {
6719        Self::DEFAULT.clone()
6720    }
6721}
6722impl MessageData for AUTOPILOT_VERSION_DATA {
6723    type Message = MavMessage;
6724    const ID: u32 = 148u32;
6725    const NAME: &'static str = "AUTOPILOT_VERSION";
6726    const EXTRA_CRC: u8 = 178u8;
6727    const ENCODED_LEN: usize = 78usize;
6728    fn deser(
6729        _version: MavlinkVersion,
6730        __input: &[u8],
6731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6732        let avail_len = __input.len();
6733        let mut payload_buf = [0; Self::ENCODED_LEN];
6734        let mut buf = if avail_len < Self::ENCODED_LEN {
6735            payload_buf[0..avail_len].copy_from_slice(__input);
6736            Bytes::new(&payload_buf)
6737        } else {
6738            Bytes::new(__input)
6739        };
6740        let mut __struct = Self::default();
6741        let tmp = buf.get_u64_le()?;
6742        __struct.capabilities = MavProtocolCapability::from_bits(
6743            tmp as <MavProtocolCapability as Flags>::Bits,
6744        )
6745        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6746            flag_type: "MavProtocolCapability",
6747            value: tmp as u64,
6748        })?;
6749        __struct.uid = buf.get_u64_le()?;
6750        __struct.flight_sw_version = buf.get_u32_le()?;
6751        __struct.middleware_sw_version = buf.get_u32_le()?;
6752        __struct.os_sw_version = buf.get_u32_le()?;
6753        __struct.board_version = buf.get_u32_le()?;
6754        __struct.vendor_id = buf.get_u16_le()?;
6755        __struct.product_id = buf.get_u16_le()?;
6756        for v in &mut __struct.flight_custom_version {
6757            let val = buf.get_u8()?;
6758            *v = val;
6759        }
6760        for v in &mut __struct.middleware_custom_version {
6761            let val = buf.get_u8()?;
6762            *v = val;
6763        }
6764        for v in &mut __struct.os_custom_version {
6765            let val = buf.get_u8()?;
6766            *v = val;
6767        }
6768        for v in &mut __struct.uid2 {
6769            let val = buf.get_u8()?;
6770            *v = val;
6771        }
6772        Ok(__struct)
6773    }
6774    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6775        let mut __tmp = BytesMut::new(bytes);
6776        #[allow(clippy::absurd_extreme_comparisons)]
6777        #[allow(unused_comparisons)]
6778        if __tmp.remaining() < Self::ENCODED_LEN {
6779            panic!(
6780                "buffer is too small (need {} bytes, but got {})",
6781                Self::ENCODED_LEN,
6782                __tmp.remaining(),
6783            )
6784        }
6785        __tmp.put_u64_le(self.capabilities.bits() as u64);
6786        __tmp.put_u64_le(self.uid);
6787        __tmp.put_u32_le(self.flight_sw_version);
6788        __tmp.put_u32_le(self.middleware_sw_version);
6789        __tmp.put_u32_le(self.os_sw_version);
6790        __tmp.put_u32_le(self.board_version);
6791        __tmp.put_u16_le(self.vendor_id);
6792        __tmp.put_u16_le(self.product_id);
6793        for val in &self.flight_custom_version {
6794            __tmp.put_u8(*val);
6795        }
6796        for val in &self.middleware_custom_version {
6797            __tmp.put_u8(*val);
6798        }
6799        for val in &self.os_custom_version {
6800            __tmp.put_u8(*val);
6801        }
6802        if matches!(version, MavlinkVersion::V2) {
6803            for val in &self.uid2 {
6804                __tmp.put_u8(*val);
6805            }
6806            let len = __tmp.len();
6807            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6808        } else {
6809            __tmp.len()
6810        }
6811    }
6812}
6813#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6814#[doc = ""]
6815#[doc = "ID: 435"]
6816#[derive(Debug, Clone, PartialEq)]
6817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6819#[cfg_attr(feature = "ts", derive(TS))]
6820#[cfg_attr(feature = "ts", ts(export))]
6821pub struct AVAILABLE_MODES_DATA {
6822    #[doc = "A bitfield for use for autopilot-specific flags"]
6823    pub custom_mode: u32,
6824    #[doc = "Mode properties."]
6825    pub properties: MavModeProperty,
6826    #[doc = "The total number of available modes for the current vehicle type."]
6827    pub number_modes: u8,
6828    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6829    pub mode_index: u8,
6830    #[doc = "Standard mode."]
6831    pub standard_mode: MavStandardMode,
6832    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6833    #[cfg_attr(feature = "ts", ts(type = "string"))]
6834    pub mode_name: CharArray<35>,
6835}
6836impl AVAILABLE_MODES_DATA {
6837    pub const ENCODED_LEN: usize = 46usize;
6838    pub const DEFAULT: Self = Self {
6839        custom_mode: 0_u32,
6840        properties: MavModeProperty::DEFAULT,
6841        number_modes: 0_u8,
6842        mode_index: 0_u8,
6843        standard_mode: MavStandardMode::DEFAULT,
6844        mode_name: CharArray::new([0_u8; 35usize]),
6845    };
6846    #[cfg(feature = "arbitrary")]
6847    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6848        use arbitrary::{Arbitrary, Unstructured};
6849        let mut buf = [0u8; 1024];
6850        rng.fill_bytes(&mut buf);
6851        let mut unstructured = Unstructured::new(&buf);
6852        Self::arbitrary(&mut unstructured).unwrap_or_default()
6853    }
6854}
6855impl Default for AVAILABLE_MODES_DATA {
6856    fn default() -> Self {
6857        Self::DEFAULT.clone()
6858    }
6859}
6860impl MessageData for AVAILABLE_MODES_DATA {
6861    type Message = MavMessage;
6862    const ID: u32 = 435u32;
6863    const NAME: &'static str = "AVAILABLE_MODES";
6864    const EXTRA_CRC: u8 = 134u8;
6865    const ENCODED_LEN: usize = 46usize;
6866    fn deser(
6867        _version: MavlinkVersion,
6868        __input: &[u8],
6869    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6870        let avail_len = __input.len();
6871        let mut payload_buf = [0; Self::ENCODED_LEN];
6872        let mut buf = if avail_len < Self::ENCODED_LEN {
6873            payload_buf[0..avail_len].copy_from_slice(__input);
6874            Bytes::new(&payload_buf)
6875        } else {
6876            Bytes::new(__input)
6877        };
6878        let mut __struct = Self::default();
6879        __struct.custom_mode = buf.get_u32_le()?;
6880        let tmp = buf.get_u32_le()?;
6881        __struct.properties = MavModeProperty::from_bits(tmp as <MavModeProperty as Flags>::Bits)
6882            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6883            flag_type: "MavModeProperty",
6884            value: tmp as u64,
6885        })?;
6886        __struct.number_modes = buf.get_u8()?;
6887        __struct.mode_index = buf.get_u8()?;
6888        let tmp = buf.get_u8()?;
6889        __struct.standard_mode =
6890            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6891                enum_type: "MavStandardMode",
6892                value: tmp as u64,
6893            })?;
6894        let mut tmp = [0_u8; 35usize];
6895        for v in &mut tmp {
6896            *v = buf.get_u8()?;
6897        }
6898        __struct.mode_name = CharArray::new(tmp);
6899        Ok(__struct)
6900    }
6901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6902        let mut __tmp = BytesMut::new(bytes);
6903        #[allow(clippy::absurd_extreme_comparisons)]
6904        #[allow(unused_comparisons)]
6905        if __tmp.remaining() < Self::ENCODED_LEN {
6906            panic!(
6907                "buffer is too small (need {} bytes, but got {})",
6908                Self::ENCODED_LEN,
6909                __tmp.remaining(),
6910            )
6911        }
6912        __tmp.put_u32_le(self.custom_mode);
6913        __tmp.put_u32_le(self.properties.bits() as u32);
6914        __tmp.put_u8(self.number_modes);
6915        __tmp.put_u8(self.mode_index);
6916        __tmp.put_u8(self.standard_mode as u8);
6917        for val in &self.mode_name {
6918            __tmp.put_u8(*val);
6919        }
6920        if matches!(version, MavlinkVersion::V2) {
6921            let len = __tmp.len();
6922            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6923        } else {
6924            __tmp.len()
6925        }
6926    }
6927}
6928#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6929#[doc = ""]
6930#[doc = "ID: 437"]
6931#[derive(Debug, Clone, PartialEq)]
6932#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6934#[cfg_attr(feature = "ts", derive(TS))]
6935#[cfg_attr(feature = "ts", ts(export))]
6936pub struct AVAILABLE_MODES_MONITOR_DATA {
6937    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6938    pub seq: u8,
6939}
6940impl AVAILABLE_MODES_MONITOR_DATA {
6941    pub const ENCODED_LEN: usize = 1usize;
6942    pub const DEFAULT: Self = Self { seq: 0_u8 };
6943    #[cfg(feature = "arbitrary")]
6944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6945        use arbitrary::{Arbitrary, Unstructured};
6946        let mut buf = [0u8; 1024];
6947        rng.fill_bytes(&mut buf);
6948        let mut unstructured = Unstructured::new(&buf);
6949        Self::arbitrary(&mut unstructured).unwrap_or_default()
6950    }
6951}
6952impl Default for AVAILABLE_MODES_MONITOR_DATA {
6953    fn default() -> Self {
6954        Self::DEFAULT.clone()
6955    }
6956}
6957impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6958    type Message = MavMessage;
6959    const ID: u32 = 437u32;
6960    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6961    const EXTRA_CRC: u8 = 30u8;
6962    const ENCODED_LEN: usize = 1usize;
6963    fn deser(
6964        _version: MavlinkVersion,
6965        __input: &[u8],
6966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6967        let avail_len = __input.len();
6968        let mut payload_buf = [0; Self::ENCODED_LEN];
6969        let mut buf = if avail_len < Self::ENCODED_LEN {
6970            payload_buf[0..avail_len].copy_from_slice(__input);
6971            Bytes::new(&payload_buf)
6972        } else {
6973            Bytes::new(__input)
6974        };
6975        let mut __struct = Self::default();
6976        __struct.seq = buf.get_u8()?;
6977        Ok(__struct)
6978    }
6979    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6980        let mut __tmp = BytesMut::new(bytes);
6981        #[allow(clippy::absurd_extreme_comparisons)]
6982        #[allow(unused_comparisons)]
6983        if __tmp.remaining() < Self::ENCODED_LEN {
6984            panic!(
6985                "buffer is too small (need {} bytes, but got {})",
6986                Self::ENCODED_LEN,
6987                __tmp.remaining(),
6988            )
6989        }
6990        __tmp.put_u8(self.seq);
6991        if matches!(version, MavlinkVersion::V2) {
6992            let len = __tmp.len();
6993            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6994        } else {
6995            __tmp.len()
6996        }
6997    }
6998}
6999#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
7000#[doc = ""]
7001#[doc = "ID: 372"]
7002#[derive(Debug, Clone, PartialEq)]
7003#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7004#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7005#[cfg_attr(feature = "ts", derive(TS))]
7006#[cfg_attr(feature = "ts", ts(export))]
7007pub struct BATTERY_INFO_DATA {
7008    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
7009    pub discharge_minimum_voltage: f32,
7010    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
7011    pub charging_minimum_voltage: f32,
7012    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
7013    pub resting_minimum_voltage: f32,
7014    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
7015    pub charging_maximum_voltage: f32,
7016    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
7017    pub charging_maximum_current: f32,
7018    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
7019    pub nominal_voltage: f32,
7020    #[doc = "Maximum pack discharge current. 0: field not provided."]
7021    pub discharge_maximum_current: f32,
7022    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
7023    pub discharge_maximum_burst_current: f32,
7024    #[doc = "Fully charged design capacity. 0: field not provided."]
7025    pub design_capacity: f32,
7026    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
7027    pub full_charge_capacity: f32,
7028    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
7029    pub cycle_count: u16,
7030    #[doc = "Battery weight. 0: field not provided."]
7031    pub weight: u16,
7032    #[doc = "Battery ID"]
7033    pub id: u8,
7034    #[doc = "Function of the battery."]
7035    pub battery_function: MavBatteryFunction,
7036    #[doc = "Type (chemistry) of the battery."]
7037    pub mavtype: MavBatteryType,
7038    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
7039    pub state_of_health: u8,
7040    #[doc = "Number of battery cells in series. 0: field not provided."]
7041    pub cells_in_series: u8,
7042    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
7043    #[cfg_attr(feature = "ts", ts(type = "string"))]
7044    pub manufacture_date: CharArray<9>,
7045    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
7046    #[cfg_attr(feature = "ts", ts(type = "string"))]
7047    pub serial_number: CharArray<32>,
7048    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
7049    #[cfg_attr(feature = "ts", ts(type = "string"))]
7050    pub name: CharArray<50>,
7051}
7052impl BATTERY_INFO_DATA {
7053    pub const ENCODED_LEN: usize = 140usize;
7054    pub const DEFAULT: Self = Self {
7055        discharge_minimum_voltage: 0.0_f32,
7056        charging_minimum_voltage: 0.0_f32,
7057        resting_minimum_voltage: 0.0_f32,
7058        charging_maximum_voltage: 0.0_f32,
7059        charging_maximum_current: 0.0_f32,
7060        nominal_voltage: 0.0_f32,
7061        discharge_maximum_current: 0.0_f32,
7062        discharge_maximum_burst_current: 0.0_f32,
7063        design_capacity: 0.0_f32,
7064        full_charge_capacity: 0.0_f32,
7065        cycle_count: 0_u16,
7066        weight: 0_u16,
7067        id: 0_u8,
7068        battery_function: MavBatteryFunction::DEFAULT,
7069        mavtype: MavBatteryType::DEFAULT,
7070        state_of_health: 0_u8,
7071        cells_in_series: 0_u8,
7072        manufacture_date: CharArray::new([0_u8; 9usize]),
7073        serial_number: CharArray::new([0_u8; 32usize]),
7074        name: CharArray::new([0_u8; 50usize]),
7075    };
7076    #[cfg(feature = "arbitrary")]
7077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7078        use arbitrary::{Arbitrary, Unstructured};
7079        let mut buf = [0u8; 1024];
7080        rng.fill_bytes(&mut buf);
7081        let mut unstructured = Unstructured::new(&buf);
7082        Self::arbitrary(&mut unstructured).unwrap_or_default()
7083    }
7084}
7085impl Default for BATTERY_INFO_DATA {
7086    fn default() -> Self {
7087        Self::DEFAULT.clone()
7088    }
7089}
7090impl MessageData for BATTERY_INFO_DATA {
7091    type Message = MavMessage;
7092    const ID: u32 = 372u32;
7093    const NAME: &'static str = "BATTERY_INFO";
7094    const EXTRA_CRC: u8 = 26u8;
7095    const ENCODED_LEN: usize = 140usize;
7096    fn deser(
7097        _version: MavlinkVersion,
7098        __input: &[u8],
7099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7100        let avail_len = __input.len();
7101        let mut payload_buf = [0; Self::ENCODED_LEN];
7102        let mut buf = if avail_len < Self::ENCODED_LEN {
7103            payload_buf[0..avail_len].copy_from_slice(__input);
7104            Bytes::new(&payload_buf)
7105        } else {
7106            Bytes::new(__input)
7107        };
7108        let mut __struct = Self::default();
7109        __struct.discharge_minimum_voltage = buf.get_f32_le()?;
7110        __struct.charging_minimum_voltage = buf.get_f32_le()?;
7111        __struct.resting_minimum_voltage = buf.get_f32_le()?;
7112        __struct.charging_maximum_voltage = buf.get_f32_le()?;
7113        __struct.charging_maximum_current = buf.get_f32_le()?;
7114        __struct.nominal_voltage = buf.get_f32_le()?;
7115        __struct.discharge_maximum_current = buf.get_f32_le()?;
7116        __struct.discharge_maximum_burst_current = buf.get_f32_le()?;
7117        __struct.design_capacity = buf.get_f32_le()?;
7118        __struct.full_charge_capacity = buf.get_f32_le()?;
7119        __struct.cycle_count = buf.get_u16_le()?;
7120        __struct.weight = buf.get_u16_le()?;
7121        __struct.id = buf.get_u8()?;
7122        let tmp = buf.get_u8()?;
7123        __struct.battery_function =
7124            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7125                enum_type: "MavBatteryFunction",
7126                value: tmp as u64,
7127            })?;
7128        let tmp = buf.get_u8()?;
7129        __struct.mavtype =
7130            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7131                enum_type: "MavBatteryType",
7132                value: tmp as u64,
7133            })?;
7134        __struct.state_of_health = buf.get_u8()?;
7135        __struct.cells_in_series = buf.get_u8()?;
7136        let mut tmp = [0_u8; 9usize];
7137        for v in &mut tmp {
7138            *v = buf.get_u8()?;
7139        }
7140        __struct.manufacture_date = CharArray::new(tmp);
7141        let mut tmp = [0_u8; 32usize];
7142        for v in &mut tmp {
7143            *v = buf.get_u8()?;
7144        }
7145        __struct.serial_number = CharArray::new(tmp);
7146        let mut tmp = [0_u8; 50usize];
7147        for v in &mut tmp {
7148            *v = buf.get_u8()?;
7149        }
7150        __struct.name = CharArray::new(tmp);
7151        Ok(__struct)
7152    }
7153    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7154        let mut __tmp = BytesMut::new(bytes);
7155        #[allow(clippy::absurd_extreme_comparisons)]
7156        #[allow(unused_comparisons)]
7157        if __tmp.remaining() < Self::ENCODED_LEN {
7158            panic!(
7159                "buffer is too small (need {} bytes, but got {})",
7160                Self::ENCODED_LEN,
7161                __tmp.remaining(),
7162            )
7163        }
7164        __tmp.put_f32_le(self.discharge_minimum_voltage);
7165        __tmp.put_f32_le(self.charging_minimum_voltage);
7166        __tmp.put_f32_le(self.resting_minimum_voltage);
7167        __tmp.put_f32_le(self.charging_maximum_voltage);
7168        __tmp.put_f32_le(self.charging_maximum_current);
7169        __tmp.put_f32_le(self.nominal_voltage);
7170        __tmp.put_f32_le(self.discharge_maximum_current);
7171        __tmp.put_f32_le(self.discharge_maximum_burst_current);
7172        __tmp.put_f32_le(self.design_capacity);
7173        __tmp.put_f32_le(self.full_charge_capacity);
7174        __tmp.put_u16_le(self.cycle_count);
7175        __tmp.put_u16_le(self.weight);
7176        __tmp.put_u8(self.id);
7177        __tmp.put_u8(self.battery_function as u8);
7178        __tmp.put_u8(self.mavtype as u8);
7179        __tmp.put_u8(self.state_of_health);
7180        __tmp.put_u8(self.cells_in_series);
7181        for val in &self.manufacture_date {
7182            __tmp.put_u8(*val);
7183        }
7184        for val in &self.serial_number {
7185            __tmp.put_u8(*val);
7186        }
7187        for val in &self.name {
7188            __tmp.put_u8(*val);
7189        }
7190        if matches!(version, MavlinkVersion::V2) {
7191            let len = __tmp.len();
7192            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7193        } else {
7194            __tmp.len()
7195        }
7196    }
7197}
7198#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
7199#[doc = ""]
7200#[doc = "ID: 147"]
7201#[derive(Debug, Clone, PartialEq)]
7202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7204#[cfg_attr(feature = "ts", derive(TS))]
7205#[cfg_attr(feature = "ts", ts(export))]
7206pub struct BATTERY_STATUS_DATA {
7207    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
7208    pub current_consumed: i32,
7209    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
7210    pub energy_consumed: i32,
7211    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
7212    pub temperature: i16,
7213    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
7214    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7215    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7216    pub voltages: [u16; 10],
7217    #[doc = "Battery current, -1: autopilot does not measure the current"]
7218    pub current_battery: i16,
7219    #[doc = "Battery ID"]
7220    pub id: u8,
7221    #[doc = "Function of the battery"]
7222    pub battery_function: MavBatteryFunction,
7223    #[doc = "Type (chemistry) of the battery"]
7224    pub mavtype: MavBatteryType,
7225    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
7226    pub battery_remaining: i8,
7227    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
7228    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7229    pub time_remaining: i32,
7230    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
7231    #[cfg_attr(feature = "serde", serde(default))]
7232    pub charge_state: MavBatteryChargeState,
7233    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
7234    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7235    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7236    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7237    pub voltages_ext: [u16; 4],
7238    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
7239    #[cfg_attr(feature = "serde", serde(default))]
7240    pub mode: MavBatteryMode,
7241    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
7242    #[cfg_attr(feature = "serde", serde(default))]
7243    pub fault_bitmask: MavBatteryFault,
7244}
7245impl BATTERY_STATUS_DATA {
7246    pub const ENCODED_LEN: usize = 54usize;
7247    pub const DEFAULT: Self = Self {
7248        current_consumed: 0_i32,
7249        energy_consumed: 0_i32,
7250        temperature: 0_i16,
7251        voltages: [0_u16; 10usize],
7252        current_battery: 0_i16,
7253        id: 0_u8,
7254        battery_function: MavBatteryFunction::DEFAULT,
7255        mavtype: MavBatteryType::DEFAULT,
7256        battery_remaining: 0_i8,
7257        time_remaining: 0_i32,
7258        charge_state: MavBatteryChargeState::DEFAULT,
7259        voltages_ext: [0_u16; 4usize],
7260        mode: MavBatteryMode::DEFAULT,
7261        fault_bitmask: MavBatteryFault::DEFAULT,
7262    };
7263    #[cfg(feature = "arbitrary")]
7264    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7265        use arbitrary::{Arbitrary, Unstructured};
7266        let mut buf = [0u8; 1024];
7267        rng.fill_bytes(&mut buf);
7268        let mut unstructured = Unstructured::new(&buf);
7269        Self::arbitrary(&mut unstructured).unwrap_or_default()
7270    }
7271}
7272impl Default for BATTERY_STATUS_DATA {
7273    fn default() -> Self {
7274        Self::DEFAULT.clone()
7275    }
7276}
7277impl MessageData for BATTERY_STATUS_DATA {
7278    type Message = MavMessage;
7279    const ID: u32 = 147u32;
7280    const NAME: &'static str = "BATTERY_STATUS";
7281    const EXTRA_CRC: u8 = 154u8;
7282    const ENCODED_LEN: usize = 54usize;
7283    fn deser(
7284        _version: MavlinkVersion,
7285        __input: &[u8],
7286    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7287        let avail_len = __input.len();
7288        let mut payload_buf = [0; Self::ENCODED_LEN];
7289        let mut buf = if avail_len < Self::ENCODED_LEN {
7290            payload_buf[0..avail_len].copy_from_slice(__input);
7291            Bytes::new(&payload_buf)
7292        } else {
7293            Bytes::new(__input)
7294        };
7295        let mut __struct = Self::default();
7296        __struct.current_consumed = buf.get_i32_le()?;
7297        __struct.energy_consumed = buf.get_i32_le()?;
7298        __struct.temperature = buf.get_i16_le()?;
7299        for v in &mut __struct.voltages {
7300            let val = buf.get_u16_le()?;
7301            *v = val;
7302        }
7303        __struct.current_battery = buf.get_i16_le()?;
7304        __struct.id = buf.get_u8()?;
7305        let tmp = buf.get_u8()?;
7306        __struct.battery_function =
7307            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7308                enum_type: "MavBatteryFunction",
7309                value: tmp as u64,
7310            })?;
7311        let tmp = buf.get_u8()?;
7312        __struct.mavtype =
7313            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7314                enum_type: "MavBatteryType",
7315                value: tmp as u64,
7316            })?;
7317        __struct.battery_remaining = buf.get_i8()?;
7318        __struct.time_remaining = buf.get_i32_le()?;
7319        let tmp = buf.get_u8()?;
7320        __struct.charge_state =
7321            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7322                enum_type: "MavBatteryChargeState",
7323                value: tmp as u64,
7324            })?;
7325        for v in &mut __struct.voltages_ext {
7326            let val = buf.get_u16_le()?;
7327            *v = val;
7328        }
7329        let tmp = buf.get_u8()?;
7330        __struct.mode =
7331            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7332                enum_type: "MavBatteryMode",
7333                value: tmp as u64,
7334            })?;
7335        let tmp = buf.get_u32_le()?;
7336        __struct.fault_bitmask = MavBatteryFault::from_bits(
7337            tmp as <MavBatteryFault as Flags>::Bits,
7338        )
7339        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7340            flag_type: "MavBatteryFault",
7341            value: tmp as u64,
7342        })?;
7343        Ok(__struct)
7344    }
7345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7346        let mut __tmp = BytesMut::new(bytes);
7347        #[allow(clippy::absurd_extreme_comparisons)]
7348        #[allow(unused_comparisons)]
7349        if __tmp.remaining() < Self::ENCODED_LEN {
7350            panic!(
7351                "buffer is too small (need {} bytes, but got {})",
7352                Self::ENCODED_LEN,
7353                __tmp.remaining(),
7354            )
7355        }
7356        __tmp.put_i32_le(self.current_consumed);
7357        __tmp.put_i32_le(self.energy_consumed);
7358        __tmp.put_i16_le(self.temperature);
7359        for val in &self.voltages {
7360            __tmp.put_u16_le(*val);
7361        }
7362        __tmp.put_i16_le(self.current_battery);
7363        __tmp.put_u8(self.id);
7364        __tmp.put_u8(self.battery_function as u8);
7365        __tmp.put_u8(self.mavtype as u8);
7366        __tmp.put_i8(self.battery_remaining);
7367        if matches!(version, MavlinkVersion::V2) {
7368            __tmp.put_i32_le(self.time_remaining);
7369            __tmp.put_u8(self.charge_state as u8);
7370            for val in &self.voltages_ext {
7371                __tmp.put_u16_le(*val);
7372            }
7373            __tmp.put_u8(self.mode as u8);
7374            __tmp.put_u32_le(self.fault_bitmask.bits() as u32);
7375            let len = __tmp.len();
7376            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7377        } else {
7378            __tmp.len()
7379        }
7380    }
7381}
7382#[doc = "Report button state change."]
7383#[doc = ""]
7384#[doc = "ID: 257"]
7385#[derive(Debug, Clone, PartialEq)]
7386#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7387#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7388#[cfg_attr(feature = "ts", derive(TS))]
7389#[cfg_attr(feature = "ts", ts(export))]
7390pub struct BUTTON_CHANGE_DATA {
7391    #[doc = "Timestamp (time since system boot)."]
7392    pub time_boot_ms: u32,
7393    #[doc = "Time of last change of button state."]
7394    pub last_change_ms: u32,
7395    #[doc = "Bitmap for state of buttons."]
7396    pub state: u8,
7397}
7398impl BUTTON_CHANGE_DATA {
7399    pub const ENCODED_LEN: usize = 9usize;
7400    pub const DEFAULT: Self = Self {
7401        time_boot_ms: 0_u32,
7402        last_change_ms: 0_u32,
7403        state: 0_u8,
7404    };
7405    #[cfg(feature = "arbitrary")]
7406    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7407        use arbitrary::{Arbitrary, Unstructured};
7408        let mut buf = [0u8; 1024];
7409        rng.fill_bytes(&mut buf);
7410        let mut unstructured = Unstructured::new(&buf);
7411        Self::arbitrary(&mut unstructured).unwrap_or_default()
7412    }
7413}
7414impl Default for BUTTON_CHANGE_DATA {
7415    fn default() -> Self {
7416        Self::DEFAULT.clone()
7417    }
7418}
7419impl MessageData for BUTTON_CHANGE_DATA {
7420    type Message = MavMessage;
7421    const ID: u32 = 257u32;
7422    const NAME: &'static str = "BUTTON_CHANGE";
7423    const EXTRA_CRC: u8 = 131u8;
7424    const ENCODED_LEN: usize = 9usize;
7425    fn deser(
7426        _version: MavlinkVersion,
7427        __input: &[u8],
7428    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7429        let avail_len = __input.len();
7430        let mut payload_buf = [0; Self::ENCODED_LEN];
7431        let mut buf = if avail_len < Self::ENCODED_LEN {
7432            payload_buf[0..avail_len].copy_from_slice(__input);
7433            Bytes::new(&payload_buf)
7434        } else {
7435            Bytes::new(__input)
7436        };
7437        let mut __struct = Self::default();
7438        __struct.time_boot_ms = buf.get_u32_le()?;
7439        __struct.last_change_ms = buf.get_u32_le()?;
7440        __struct.state = buf.get_u8()?;
7441        Ok(__struct)
7442    }
7443    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7444        let mut __tmp = BytesMut::new(bytes);
7445        #[allow(clippy::absurd_extreme_comparisons)]
7446        #[allow(unused_comparisons)]
7447        if __tmp.remaining() < Self::ENCODED_LEN {
7448            panic!(
7449                "buffer is too small (need {} bytes, but got {})",
7450                Self::ENCODED_LEN,
7451                __tmp.remaining(),
7452            )
7453        }
7454        __tmp.put_u32_le(self.time_boot_ms);
7455        __tmp.put_u32_le(self.last_change_ms);
7456        __tmp.put_u8(self.state);
7457        if matches!(version, MavlinkVersion::V2) {
7458            let len = __tmp.len();
7459            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7460        } else {
7461            __tmp.len()
7462        }
7463    }
7464}
7465#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7466#[doc = ""]
7467#[doc = "ID: 262"]
7468#[derive(Debug, Clone, PartialEq)]
7469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7471#[cfg_attr(feature = "ts", derive(TS))]
7472#[cfg_attr(feature = "ts", ts(export))]
7473pub struct CAMERA_CAPTURE_STATUS_DATA {
7474    #[doc = "Timestamp (time since system boot)."]
7475    pub time_boot_ms: u32,
7476    #[doc = "Image capture interval"]
7477    pub image_interval: f32,
7478    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7479    pub recording_time_ms: u32,
7480    #[doc = "Available storage capacity."]
7481    pub available_capacity: f32,
7482    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7483    pub image_status: u8,
7484    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7485    pub video_status: u8,
7486    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7487    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7488    pub image_count: i32,
7489    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7490    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7491    pub camera_device_id: u8,
7492}
7493impl CAMERA_CAPTURE_STATUS_DATA {
7494    pub const ENCODED_LEN: usize = 23usize;
7495    pub const DEFAULT: Self = Self {
7496        time_boot_ms: 0_u32,
7497        image_interval: 0.0_f32,
7498        recording_time_ms: 0_u32,
7499        available_capacity: 0.0_f32,
7500        image_status: 0_u8,
7501        video_status: 0_u8,
7502        image_count: 0_i32,
7503        camera_device_id: 0_u8,
7504    };
7505    #[cfg(feature = "arbitrary")]
7506    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7507        use arbitrary::{Arbitrary, Unstructured};
7508        let mut buf = [0u8; 1024];
7509        rng.fill_bytes(&mut buf);
7510        let mut unstructured = Unstructured::new(&buf);
7511        Self::arbitrary(&mut unstructured).unwrap_or_default()
7512    }
7513}
7514impl Default for CAMERA_CAPTURE_STATUS_DATA {
7515    fn default() -> Self {
7516        Self::DEFAULT.clone()
7517    }
7518}
7519impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7520    type Message = MavMessage;
7521    const ID: u32 = 262u32;
7522    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7523    const EXTRA_CRC: u8 = 12u8;
7524    const ENCODED_LEN: usize = 23usize;
7525    fn deser(
7526        _version: MavlinkVersion,
7527        __input: &[u8],
7528    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7529        let avail_len = __input.len();
7530        let mut payload_buf = [0; Self::ENCODED_LEN];
7531        let mut buf = if avail_len < Self::ENCODED_LEN {
7532            payload_buf[0..avail_len].copy_from_slice(__input);
7533            Bytes::new(&payload_buf)
7534        } else {
7535            Bytes::new(__input)
7536        };
7537        let mut __struct = Self::default();
7538        __struct.time_boot_ms = buf.get_u32_le()?;
7539        __struct.image_interval = buf.get_f32_le()?;
7540        __struct.recording_time_ms = buf.get_u32_le()?;
7541        __struct.available_capacity = buf.get_f32_le()?;
7542        __struct.image_status = buf.get_u8()?;
7543        __struct.video_status = buf.get_u8()?;
7544        __struct.image_count = buf.get_i32_le()?;
7545        __struct.camera_device_id = buf.get_u8()?;
7546        Ok(__struct)
7547    }
7548    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7549        let mut __tmp = BytesMut::new(bytes);
7550        #[allow(clippy::absurd_extreme_comparisons)]
7551        #[allow(unused_comparisons)]
7552        if __tmp.remaining() < Self::ENCODED_LEN {
7553            panic!(
7554                "buffer is too small (need {} bytes, but got {})",
7555                Self::ENCODED_LEN,
7556                __tmp.remaining(),
7557            )
7558        }
7559        __tmp.put_u32_le(self.time_boot_ms);
7560        __tmp.put_f32_le(self.image_interval);
7561        __tmp.put_u32_le(self.recording_time_ms);
7562        __tmp.put_f32_le(self.available_capacity);
7563        __tmp.put_u8(self.image_status);
7564        __tmp.put_u8(self.video_status);
7565        if matches!(version, MavlinkVersion::V2) {
7566            __tmp.put_i32_le(self.image_count);
7567            __tmp.put_u8(self.camera_device_id);
7568            let len = __tmp.len();
7569            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7570        } else {
7571            __tmp.len()
7572        }
7573    }
7574}
7575#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7576#[doc = ""]
7577#[doc = "ID: 271"]
7578#[derive(Debug, Clone, PartialEq)]
7579#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7581#[cfg_attr(feature = "ts", derive(TS))]
7582#[cfg_attr(feature = "ts", ts(export))]
7583pub struct CAMERA_FOV_STATUS_DATA {
7584    #[doc = "Timestamp (time since system boot)."]
7585    pub time_boot_ms: u32,
7586    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7587    pub lat_camera: i32,
7588    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7589    pub lon_camera: i32,
7590    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7591    pub alt_camera: i32,
7592    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7593    pub lat_image: i32,
7594    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7595    pub lon_image: i32,
7596    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7597    pub alt_image: i32,
7598    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7599    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7600    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7601    pub q: [f32; 4],
7602    #[doc = "Horizontal field of view (NaN if unknown)."]
7603    pub hfov: f32,
7604    #[doc = "Vertical field of view (NaN if unknown)."]
7605    pub vfov: f32,
7606    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7607    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7608    pub camera_device_id: u8,
7609}
7610impl CAMERA_FOV_STATUS_DATA {
7611    pub const ENCODED_LEN: usize = 53usize;
7612    pub const DEFAULT: Self = Self {
7613        time_boot_ms: 0_u32,
7614        lat_camera: 0_i32,
7615        lon_camera: 0_i32,
7616        alt_camera: 0_i32,
7617        lat_image: 0_i32,
7618        lon_image: 0_i32,
7619        alt_image: 0_i32,
7620        q: [0.0_f32; 4usize],
7621        hfov: 0.0_f32,
7622        vfov: 0.0_f32,
7623        camera_device_id: 0_u8,
7624    };
7625    #[cfg(feature = "arbitrary")]
7626    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7627        use arbitrary::{Arbitrary, Unstructured};
7628        let mut buf = [0u8; 1024];
7629        rng.fill_bytes(&mut buf);
7630        let mut unstructured = Unstructured::new(&buf);
7631        Self::arbitrary(&mut unstructured).unwrap_or_default()
7632    }
7633}
7634impl Default for CAMERA_FOV_STATUS_DATA {
7635    fn default() -> Self {
7636        Self::DEFAULT.clone()
7637    }
7638}
7639impl MessageData for CAMERA_FOV_STATUS_DATA {
7640    type Message = MavMessage;
7641    const ID: u32 = 271u32;
7642    const NAME: &'static str = "CAMERA_FOV_STATUS";
7643    const EXTRA_CRC: u8 = 22u8;
7644    const ENCODED_LEN: usize = 53usize;
7645    fn deser(
7646        _version: MavlinkVersion,
7647        __input: &[u8],
7648    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7649        let avail_len = __input.len();
7650        let mut payload_buf = [0; Self::ENCODED_LEN];
7651        let mut buf = if avail_len < Self::ENCODED_LEN {
7652            payload_buf[0..avail_len].copy_from_slice(__input);
7653            Bytes::new(&payload_buf)
7654        } else {
7655            Bytes::new(__input)
7656        };
7657        let mut __struct = Self::default();
7658        __struct.time_boot_ms = buf.get_u32_le()?;
7659        __struct.lat_camera = buf.get_i32_le()?;
7660        __struct.lon_camera = buf.get_i32_le()?;
7661        __struct.alt_camera = buf.get_i32_le()?;
7662        __struct.lat_image = buf.get_i32_le()?;
7663        __struct.lon_image = buf.get_i32_le()?;
7664        __struct.alt_image = buf.get_i32_le()?;
7665        for v in &mut __struct.q {
7666            let val = buf.get_f32_le()?;
7667            *v = val;
7668        }
7669        __struct.hfov = buf.get_f32_le()?;
7670        __struct.vfov = buf.get_f32_le()?;
7671        __struct.camera_device_id = buf.get_u8()?;
7672        Ok(__struct)
7673    }
7674    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7675        let mut __tmp = BytesMut::new(bytes);
7676        #[allow(clippy::absurd_extreme_comparisons)]
7677        #[allow(unused_comparisons)]
7678        if __tmp.remaining() < Self::ENCODED_LEN {
7679            panic!(
7680                "buffer is too small (need {} bytes, but got {})",
7681                Self::ENCODED_LEN,
7682                __tmp.remaining(),
7683            )
7684        }
7685        __tmp.put_u32_le(self.time_boot_ms);
7686        __tmp.put_i32_le(self.lat_camera);
7687        __tmp.put_i32_le(self.lon_camera);
7688        __tmp.put_i32_le(self.alt_camera);
7689        __tmp.put_i32_le(self.lat_image);
7690        __tmp.put_i32_le(self.lon_image);
7691        __tmp.put_i32_le(self.alt_image);
7692        for val in &self.q {
7693            __tmp.put_f32_le(*val);
7694        }
7695        __tmp.put_f32_le(self.hfov);
7696        __tmp.put_f32_le(self.vfov);
7697        if matches!(version, MavlinkVersion::V2) {
7698            __tmp.put_u8(self.camera_device_id);
7699            let len = __tmp.len();
7700            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7701        } else {
7702            __tmp.len()
7703        }
7704    }
7705}
7706#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7707#[doc = ""]
7708#[doc = "ID: 263"]
7709#[derive(Debug, Clone, PartialEq)]
7710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7712#[cfg_attr(feature = "ts", derive(TS))]
7713#[cfg_attr(feature = "ts", ts(export))]
7714pub struct CAMERA_IMAGE_CAPTURED_DATA {
7715    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7716    pub time_utc: u64,
7717    #[doc = "Timestamp (time since system boot)."]
7718    pub time_boot_ms: u32,
7719    #[doc = "Latitude where image was taken"]
7720    pub lat: i32,
7721    #[doc = "Longitude where capture was taken"]
7722    pub lon: i32,
7723    #[doc = "Altitude (MSL) where image was taken"]
7724    pub alt: i32,
7725    #[doc = "Altitude above ground"]
7726    pub relative_alt: i32,
7727    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7728    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7729    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7730    pub q: [f32; 4],
7731    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7732    pub image_index: i32,
7733    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7734    pub camera_id: u8,
7735    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7736    pub capture_result: i8,
7737    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7738    #[cfg_attr(feature = "ts", ts(type = "string"))]
7739    pub file_url: CharArray<205>,
7740}
7741impl CAMERA_IMAGE_CAPTURED_DATA {
7742    pub const ENCODED_LEN: usize = 255usize;
7743    pub const DEFAULT: Self = Self {
7744        time_utc: 0_u64,
7745        time_boot_ms: 0_u32,
7746        lat: 0_i32,
7747        lon: 0_i32,
7748        alt: 0_i32,
7749        relative_alt: 0_i32,
7750        q: [0.0_f32; 4usize],
7751        image_index: 0_i32,
7752        camera_id: 0_u8,
7753        capture_result: 0_i8,
7754        file_url: CharArray::new([0_u8; 205usize]),
7755    };
7756    #[cfg(feature = "arbitrary")]
7757    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7758        use arbitrary::{Arbitrary, Unstructured};
7759        let mut buf = [0u8; 1024];
7760        rng.fill_bytes(&mut buf);
7761        let mut unstructured = Unstructured::new(&buf);
7762        Self::arbitrary(&mut unstructured).unwrap_or_default()
7763    }
7764}
7765impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7766    fn default() -> Self {
7767        Self::DEFAULT.clone()
7768    }
7769}
7770impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7771    type Message = MavMessage;
7772    const ID: u32 = 263u32;
7773    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7774    const EXTRA_CRC: u8 = 133u8;
7775    const ENCODED_LEN: usize = 255usize;
7776    fn deser(
7777        _version: MavlinkVersion,
7778        __input: &[u8],
7779    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7780        let avail_len = __input.len();
7781        let mut payload_buf = [0; Self::ENCODED_LEN];
7782        let mut buf = if avail_len < Self::ENCODED_LEN {
7783            payload_buf[0..avail_len].copy_from_slice(__input);
7784            Bytes::new(&payload_buf)
7785        } else {
7786            Bytes::new(__input)
7787        };
7788        let mut __struct = Self::default();
7789        __struct.time_utc = buf.get_u64_le()?;
7790        __struct.time_boot_ms = buf.get_u32_le()?;
7791        __struct.lat = buf.get_i32_le()?;
7792        __struct.lon = buf.get_i32_le()?;
7793        __struct.alt = buf.get_i32_le()?;
7794        __struct.relative_alt = buf.get_i32_le()?;
7795        for v in &mut __struct.q {
7796            let val = buf.get_f32_le()?;
7797            *v = val;
7798        }
7799        __struct.image_index = buf.get_i32_le()?;
7800        __struct.camera_id = buf.get_u8()?;
7801        __struct.capture_result = buf.get_i8()?;
7802        let mut tmp = [0_u8; 205usize];
7803        for v in &mut tmp {
7804            *v = buf.get_u8()?;
7805        }
7806        __struct.file_url = CharArray::new(tmp);
7807        Ok(__struct)
7808    }
7809    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7810        let mut __tmp = BytesMut::new(bytes);
7811        #[allow(clippy::absurd_extreme_comparisons)]
7812        #[allow(unused_comparisons)]
7813        if __tmp.remaining() < Self::ENCODED_LEN {
7814            panic!(
7815                "buffer is too small (need {} bytes, but got {})",
7816                Self::ENCODED_LEN,
7817                __tmp.remaining(),
7818            )
7819        }
7820        __tmp.put_u64_le(self.time_utc);
7821        __tmp.put_u32_le(self.time_boot_ms);
7822        __tmp.put_i32_le(self.lat);
7823        __tmp.put_i32_le(self.lon);
7824        __tmp.put_i32_le(self.alt);
7825        __tmp.put_i32_le(self.relative_alt);
7826        for val in &self.q {
7827            __tmp.put_f32_le(*val);
7828        }
7829        __tmp.put_i32_le(self.image_index);
7830        __tmp.put_u8(self.camera_id);
7831        __tmp.put_i8(self.capture_result);
7832        for val in &self.file_url {
7833            __tmp.put_u8(*val);
7834        }
7835        if matches!(version, MavlinkVersion::V2) {
7836            let len = __tmp.len();
7837            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7838        } else {
7839            __tmp.len()
7840        }
7841    }
7842}
7843#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7844#[doc = ""]
7845#[doc = "ID: 259"]
7846#[derive(Debug, Clone, PartialEq)]
7847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7849#[cfg_attr(feature = "ts", derive(TS))]
7850#[cfg_attr(feature = "ts", ts(export))]
7851pub struct CAMERA_INFORMATION_DATA {
7852    #[doc = "Timestamp (time since system boot)."]
7853    pub time_boot_ms: u32,
7854    #[doc = "0xff). Use 0 if not known."]
7855    pub firmware_version: u32,
7856    #[doc = "Focal length. Use NaN if not known."]
7857    pub focal_length: f32,
7858    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7859    pub sensor_size_h: f32,
7860    #[doc = "Image sensor size vertical. Use NaN if not known."]
7861    pub sensor_size_v: f32,
7862    #[doc = "Bitmap of camera capability flags."]
7863    pub flags: CameraCapFlags,
7864    #[doc = "Horizontal image resolution. Use 0 if not known."]
7865    pub resolution_h: u16,
7866    #[doc = "Vertical image resolution. Use 0 if not known."]
7867    pub resolution_v: u16,
7868    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7869    pub cam_definition_version: u16,
7870    #[doc = "Name of the camera vendor"]
7871    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7872    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7873    pub vendor_name: [u8; 32],
7874    #[doc = "Name of the camera model"]
7875    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7876    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7877    pub model_name: [u8; 32],
7878    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7879    pub lens_id: u8,
7880    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7881    #[cfg_attr(feature = "ts", ts(type = "string"))]
7882    pub cam_definition_uri: CharArray<140>,
7883    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7884    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7885    pub gimbal_device_id: u8,
7886    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7887    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7888    pub camera_device_id: u8,
7889}
7890impl CAMERA_INFORMATION_DATA {
7891    pub const ENCODED_LEN: usize = 237usize;
7892    pub const DEFAULT: Self = Self {
7893        time_boot_ms: 0_u32,
7894        firmware_version: 0_u32,
7895        focal_length: 0.0_f32,
7896        sensor_size_h: 0.0_f32,
7897        sensor_size_v: 0.0_f32,
7898        flags: CameraCapFlags::DEFAULT,
7899        resolution_h: 0_u16,
7900        resolution_v: 0_u16,
7901        cam_definition_version: 0_u16,
7902        vendor_name: [0_u8; 32usize],
7903        model_name: [0_u8; 32usize],
7904        lens_id: 0_u8,
7905        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7906        gimbal_device_id: 0_u8,
7907        camera_device_id: 0_u8,
7908    };
7909    #[cfg(feature = "arbitrary")]
7910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7911        use arbitrary::{Arbitrary, Unstructured};
7912        let mut buf = [0u8; 1024];
7913        rng.fill_bytes(&mut buf);
7914        let mut unstructured = Unstructured::new(&buf);
7915        Self::arbitrary(&mut unstructured).unwrap_or_default()
7916    }
7917}
7918impl Default for CAMERA_INFORMATION_DATA {
7919    fn default() -> Self {
7920        Self::DEFAULT.clone()
7921    }
7922}
7923impl MessageData for CAMERA_INFORMATION_DATA {
7924    type Message = MavMessage;
7925    const ID: u32 = 259u32;
7926    const NAME: &'static str = "CAMERA_INFORMATION";
7927    const EXTRA_CRC: u8 = 92u8;
7928    const ENCODED_LEN: usize = 237usize;
7929    fn deser(
7930        _version: MavlinkVersion,
7931        __input: &[u8],
7932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7933        let avail_len = __input.len();
7934        let mut payload_buf = [0; Self::ENCODED_LEN];
7935        let mut buf = if avail_len < Self::ENCODED_LEN {
7936            payload_buf[0..avail_len].copy_from_slice(__input);
7937            Bytes::new(&payload_buf)
7938        } else {
7939            Bytes::new(__input)
7940        };
7941        let mut __struct = Self::default();
7942        __struct.time_boot_ms = buf.get_u32_le()?;
7943        __struct.firmware_version = buf.get_u32_le()?;
7944        __struct.focal_length = buf.get_f32_le()?;
7945        __struct.sensor_size_h = buf.get_f32_le()?;
7946        __struct.sensor_size_v = buf.get_f32_le()?;
7947        let tmp = buf.get_u32_le()?;
7948        __struct.flags = CameraCapFlags::from_bits(tmp as <CameraCapFlags as Flags>::Bits).ok_or(
7949            ::mavlink_core::error::ParserError::InvalidFlag {
7950                flag_type: "CameraCapFlags",
7951                value: tmp as u64,
7952            },
7953        )?;
7954        __struct.resolution_h = buf.get_u16_le()?;
7955        __struct.resolution_v = buf.get_u16_le()?;
7956        __struct.cam_definition_version = buf.get_u16_le()?;
7957        for v in &mut __struct.vendor_name {
7958            let val = buf.get_u8()?;
7959            *v = val;
7960        }
7961        for v in &mut __struct.model_name {
7962            let val = buf.get_u8()?;
7963            *v = val;
7964        }
7965        __struct.lens_id = buf.get_u8()?;
7966        let mut tmp = [0_u8; 140usize];
7967        for v in &mut tmp {
7968            *v = buf.get_u8()?;
7969        }
7970        __struct.cam_definition_uri = CharArray::new(tmp);
7971        __struct.gimbal_device_id = buf.get_u8()?;
7972        __struct.camera_device_id = buf.get_u8()?;
7973        Ok(__struct)
7974    }
7975    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7976        let mut __tmp = BytesMut::new(bytes);
7977        #[allow(clippy::absurd_extreme_comparisons)]
7978        #[allow(unused_comparisons)]
7979        if __tmp.remaining() < Self::ENCODED_LEN {
7980            panic!(
7981                "buffer is too small (need {} bytes, but got {})",
7982                Self::ENCODED_LEN,
7983                __tmp.remaining(),
7984            )
7985        }
7986        __tmp.put_u32_le(self.time_boot_ms);
7987        __tmp.put_u32_le(self.firmware_version);
7988        __tmp.put_f32_le(self.focal_length);
7989        __tmp.put_f32_le(self.sensor_size_h);
7990        __tmp.put_f32_le(self.sensor_size_v);
7991        __tmp.put_u32_le(self.flags.bits() as u32);
7992        __tmp.put_u16_le(self.resolution_h);
7993        __tmp.put_u16_le(self.resolution_v);
7994        __tmp.put_u16_le(self.cam_definition_version);
7995        for val in &self.vendor_name {
7996            __tmp.put_u8(*val);
7997        }
7998        for val in &self.model_name {
7999            __tmp.put_u8(*val);
8000        }
8001        __tmp.put_u8(self.lens_id);
8002        for val in &self.cam_definition_uri {
8003            __tmp.put_u8(*val);
8004        }
8005        if matches!(version, MavlinkVersion::V2) {
8006            __tmp.put_u8(self.gimbal_device_id);
8007            __tmp.put_u8(self.camera_device_id);
8008            let len = __tmp.len();
8009            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8010        } else {
8011            __tmp.len()
8012        }
8013    }
8014}
8015#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
8016#[doc = ""]
8017#[doc = "ID: 260"]
8018#[derive(Debug, Clone, PartialEq)]
8019#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8020#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8021#[cfg_attr(feature = "ts", derive(TS))]
8022#[cfg_attr(feature = "ts", ts(export))]
8023pub struct CAMERA_SETTINGS_DATA {
8024    #[doc = "Timestamp (time since system boot)."]
8025    pub time_boot_ms: u32,
8026    #[doc = "Camera mode"]
8027    pub mode_id: CameraMode,
8028    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
8029    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8030    pub zoomLevel: f32,
8031    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
8032    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8033    pub focusLevel: f32,
8034    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8035    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8036    pub camera_device_id: u8,
8037}
8038impl CAMERA_SETTINGS_DATA {
8039    pub const ENCODED_LEN: usize = 14usize;
8040    pub const DEFAULT: Self = Self {
8041        time_boot_ms: 0_u32,
8042        mode_id: CameraMode::DEFAULT,
8043        zoomLevel: 0.0_f32,
8044        focusLevel: 0.0_f32,
8045        camera_device_id: 0_u8,
8046    };
8047    #[cfg(feature = "arbitrary")]
8048    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8049        use arbitrary::{Arbitrary, Unstructured};
8050        let mut buf = [0u8; 1024];
8051        rng.fill_bytes(&mut buf);
8052        let mut unstructured = Unstructured::new(&buf);
8053        Self::arbitrary(&mut unstructured).unwrap_or_default()
8054    }
8055}
8056impl Default for CAMERA_SETTINGS_DATA {
8057    fn default() -> Self {
8058        Self::DEFAULT.clone()
8059    }
8060}
8061impl MessageData for CAMERA_SETTINGS_DATA {
8062    type Message = MavMessage;
8063    const ID: u32 = 260u32;
8064    const NAME: &'static str = "CAMERA_SETTINGS";
8065    const EXTRA_CRC: u8 = 146u8;
8066    const ENCODED_LEN: usize = 14usize;
8067    fn deser(
8068        _version: MavlinkVersion,
8069        __input: &[u8],
8070    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8071        let avail_len = __input.len();
8072        let mut payload_buf = [0; Self::ENCODED_LEN];
8073        let mut buf = if avail_len < Self::ENCODED_LEN {
8074            payload_buf[0..avail_len].copy_from_slice(__input);
8075            Bytes::new(&payload_buf)
8076        } else {
8077            Bytes::new(__input)
8078        };
8079        let mut __struct = Self::default();
8080        __struct.time_boot_ms = buf.get_u32_le()?;
8081        let tmp = buf.get_u8()?;
8082        __struct.mode_id =
8083            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8084                enum_type: "CameraMode",
8085                value: tmp as u64,
8086            })?;
8087        __struct.zoomLevel = buf.get_f32_le()?;
8088        __struct.focusLevel = buf.get_f32_le()?;
8089        __struct.camera_device_id = buf.get_u8()?;
8090        Ok(__struct)
8091    }
8092    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8093        let mut __tmp = BytesMut::new(bytes);
8094        #[allow(clippy::absurd_extreme_comparisons)]
8095        #[allow(unused_comparisons)]
8096        if __tmp.remaining() < Self::ENCODED_LEN {
8097            panic!(
8098                "buffer is too small (need {} bytes, but got {})",
8099                Self::ENCODED_LEN,
8100                __tmp.remaining(),
8101            )
8102        }
8103        __tmp.put_u32_le(self.time_boot_ms);
8104        __tmp.put_u8(self.mode_id as u8);
8105        if matches!(version, MavlinkVersion::V2) {
8106            __tmp.put_f32_le(self.zoomLevel);
8107            __tmp.put_f32_le(self.focusLevel);
8108            __tmp.put_u8(self.camera_device_id);
8109            let len = __tmp.len();
8110            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8111        } else {
8112            __tmp.len()
8113        }
8114    }
8115}
8116#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
8117#[doc = ""]
8118#[doc = "ID: 277"]
8119#[derive(Debug, Clone, PartialEq)]
8120#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8121#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8122#[cfg_attr(feature = "ts", derive(TS))]
8123#[cfg_attr(feature = "ts", ts(export))]
8124pub struct CAMERA_THERMAL_RANGE_DATA {
8125    #[doc = "Timestamp (time since system boot)."]
8126    pub time_boot_ms: u32,
8127    #[doc = "Temperature max."]
8128    pub max: f32,
8129    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8130    pub max_point_x: f32,
8131    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8132    pub max_point_y: f32,
8133    #[doc = "Temperature min."]
8134    pub min: f32,
8135    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8136    pub min_point_x: f32,
8137    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8138    pub min_point_y: f32,
8139    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
8140    pub stream_id: u8,
8141    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8142    pub camera_device_id: u8,
8143}
8144impl CAMERA_THERMAL_RANGE_DATA {
8145    pub const ENCODED_LEN: usize = 30usize;
8146    pub const DEFAULT: Self = Self {
8147        time_boot_ms: 0_u32,
8148        max: 0.0_f32,
8149        max_point_x: 0.0_f32,
8150        max_point_y: 0.0_f32,
8151        min: 0.0_f32,
8152        min_point_x: 0.0_f32,
8153        min_point_y: 0.0_f32,
8154        stream_id: 0_u8,
8155        camera_device_id: 0_u8,
8156    };
8157    #[cfg(feature = "arbitrary")]
8158    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8159        use arbitrary::{Arbitrary, Unstructured};
8160        let mut buf = [0u8; 1024];
8161        rng.fill_bytes(&mut buf);
8162        let mut unstructured = Unstructured::new(&buf);
8163        Self::arbitrary(&mut unstructured).unwrap_or_default()
8164    }
8165}
8166impl Default for CAMERA_THERMAL_RANGE_DATA {
8167    fn default() -> Self {
8168        Self::DEFAULT.clone()
8169    }
8170}
8171impl MessageData for CAMERA_THERMAL_RANGE_DATA {
8172    type Message = MavMessage;
8173    const ID: u32 = 277u32;
8174    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
8175    const EXTRA_CRC: u8 = 62u8;
8176    const ENCODED_LEN: usize = 30usize;
8177    fn deser(
8178        _version: MavlinkVersion,
8179        __input: &[u8],
8180    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8181        let avail_len = __input.len();
8182        let mut payload_buf = [0; Self::ENCODED_LEN];
8183        let mut buf = if avail_len < Self::ENCODED_LEN {
8184            payload_buf[0..avail_len].copy_from_slice(__input);
8185            Bytes::new(&payload_buf)
8186        } else {
8187            Bytes::new(__input)
8188        };
8189        let mut __struct = Self::default();
8190        __struct.time_boot_ms = buf.get_u32_le()?;
8191        __struct.max = buf.get_f32_le()?;
8192        __struct.max_point_x = buf.get_f32_le()?;
8193        __struct.max_point_y = buf.get_f32_le()?;
8194        __struct.min = buf.get_f32_le()?;
8195        __struct.min_point_x = buf.get_f32_le()?;
8196        __struct.min_point_y = buf.get_f32_le()?;
8197        __struct.stream_id = buf.get_u8()?;
8198        __struct.camera_device_id = buf.get_u8()?;
8199        Ok(__struct)
8200    }
8201    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8202        let mut __tmp = BytesMut::new(bytes);
8203        #[allow(clippy::absurd_extreme_comparisons)]
8204        #[allow(unused_comparisons)]
8205        if __tmp.remaining() < Self::ENCODED_LEN {
8206            panic!(
8207                "buffer is too small (need {} bytes, but got {})",
8208                Self::ENCODED_LEN,
8209                __tmp.remaining(),
8210            )
8211        }
8212        __tmp.put_u32_le(self.time_boot_ms);
8213        __tmp.put_f32_le(self.max);
8214        __tmp.put_f32_le(self.max_point_x);
8215        __tmp.put_f32_le(self.max_point_y);
8216        __tmp.put_f32_le(self.min);
8217        __tmp.put_f32_le(self.min_point_x);
8218        __tmp.put_f32_le(self.min_point_y);
8219        __tmp.put_u8(self.stream_id);
8220        __tmp.put_u8(self.camera_device_id);
8221        if matches!(version, MavlinkVersion::V2) {
8222            let len = __tmp.len();
8223            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8224        } else {
8225            __tmp.len()
8226        }
8227    }
8228}
8229#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8230#[doc = ""]
8231#[doc = "ID: 276"]
8232#[derive(Debug, Clone, PartialEq)]
8233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8235#[cfg_attr(feature = "ts", derive(TS))]
8236#[cfg_attr(feature = "ts", ts(export))]
8237pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
8238    #[doc = "Latitude of tracked object"]
8239    pub lat: i32,
8240    #[doc = "Longitude of tracked object"]
8241    pub lon: i32,
8242    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
8243    pub alt: f32,
8244    #[doc = "Horizontal accuracy. NAN if unknown"]
8245    pub h_acc: f32,
8246    #[doc = "Vertical accuracy. NAN if unknown"]
8247    pub v_acc: f32,
8248    #[doc = "North velocity of tracked object. NAN if unknown"]
8249    pub vel_n: f32,
8250    #[doc = "East velocity of tracked object. NAN if unknown"]
8251    pub vel_e: f32,
8252    #[doc = "Down velocity of tracked object. NAN if unknown"]
8253    pub vel_d: f32,
8254    #[doc = "Velocity accuracy. NAN if unknown"]
8255    pub vel_acc: f32,
8256    #[doc = "Distance between camera and tracked object. NAN if unknown"]
8257    pub dist: f32,
8258    #[doc = "Heading in radians, in NED. NAN if unknown"]
8259    pub hdg: f32,
8260    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
8261    pub hdg_acc: f32,
8262    #[doc = "Current tracking status"]
8263    pub tracking_status: CameraTrackingStatusFlags,
8264    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8265    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8266    pub camera_device_id: u8,
8267}
8268impl CAMERA_TRACKING_GEO_STATUS_DATA {
8269    pub const ENCODED_LEN: usize = 50usize;
8270    pub const DEFAULT: Self = Self {
8271        lat: 0_i32,
8272        lon: 0_i32,
8273        alt: 0.0_f32,
8274        h_acc: 0.0_f32,
8275        v_acc: 0.0_f32,
8276        vel_n: 0.0_f32,
8277        vel_e: 0.0_f32,
8278        vel_d: 0.0_f32,
8279        vel_acc: 0.0_f32,
8280        dist: 0.0_f32,
8281        hdg: 0.0_f32,
8282        hdg_acc: 0.0_f32,
8283        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8284        camera_device_id: 0_u8,
8285    };
8286    #[cfg(feature = "arbitrary")]
8287    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8288        use arbitrary::{Arbitrary, Unstructured};
8289        let mut buf = [0u8; 1024];
8290        rng.fill_bytes(&mut buf);
8291        let mut unstructured = Unstructured::new(&buf);
8292        Self::arbitrary(&mut unstructured).unwrap_or_default()
8293    }
8294}
8295impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
8296    fn default() -> Self {
8297        Self::DEFAULT.clone()
8298    }
8299}
8300impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
8301    type Message = MavMessage;
8302    const ID: u32 = 276u32;
8303    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
8304    const EXTRA_CRC: u8 = 18u8;
8305    const ENCODED_LEN: usize = 50usize;
8306    fn deser(
8307        _version: MavlinkVersion,
8308        __input: &[u8],
8309    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8310        let avail_len = __input.len();
8311        let mut payload_buf = [0; Self::ENCODED_LEN];
8312        let mut buf = if avail_len < Self::ENCODED_LEN {
8313            payload_buf[0..avail_len].copy_from_slice(__input);
8314            Bytes::new(&payload_buf)
8315        } else {
8316            Bytes::new(__input)
8317        };
8318        let mut __struct = Self::default();
8319        __struct.lat = buf.get_i32_le()?;
8320        __struct.lon = buf.get_i32_le()?;
8321        __struct.alt = buf.get_f32_le()?;
8322        __struct.h_acc = buf.get_f32_le()?;
8323        __struct.v_acc = buf.get_f32_le()?;
8324        __struct.vel_n = buf.get_f32_le()?;
8325        __struct.vel_e = buf.get_f32_le()?;
8326        __struct.vel_d = buf.get_f32_le()?;
8327        __struct.vel_acc = buf.get_f32_le()?;
8328        __struct.dist = buf.get_f32_le()?;
8329        __struct.hdg = buf.get_f32_le()?;
8330        __struct.hdg_acc = buf.get_f32_le()?;
8331        let tmp = buf.get_u8()?;
8332        __struct.tracking_status =
8333            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8334                enum_type: "CameraTrackingStatusFlags",
8335                value: tmp as u64,
8336            })?;
8337        __struct.camera_device_id = buf.get_u8()?;
8338        Ok(__struct)
8339    }
8340    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8341        let mut __tmp = BytesMut::new(bytes);
8342        #[allow(clippy::absurd_extreme_comparisons)]
8343        #[allow(unused_comparisons)]
8344        if __tmp.remaining() < Self::ENCODED_LEN {
8345            panic!(
8346                "buffer is too small (need {} bytes, but got {})",
8347                Self::ENCODED_LEN,
8348                __tmp.remaining(),
8349            )
8350        }
8351        __tmp.put_i32_le(self.lat);
8352        __tmp.put_i32_le(self.lon);
8353        __tmp.put_f32_le(self.alt);
8354        __tmp.put_f32_le(self.h_acc);
8355        __tmp.put_f32_le(self.v_acc);
8356        __tmp.put_f32_le(self.vel_n);
8357        __tmp.put_f32_le(self.vel_e);
8358        __tmp.put_f32_le(self.vel_d);
8359        __tmp.put_f32_le(self.vel_acc);
8360        __tmp.put_f32_le(self.dist);
8361        __tmp.put_f32_le(self.hdg);
8362        __tmp.put_f32_le(self.hdg_acc);
8363        __tmp.put_u8(self.tracking_status as u8);
8364        if matches!(version, MavlinkVersion::V2) {
8365            __tmp.put_u8(self.camera_device_id);
8366            let len = __tmp.len();
8367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8368        } else {
8369            __tmp.len()
8370        }
8371    }
8372}
8373#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8374#[doc = ""]
8375#[doc = "ID: 275"]
8376#[derive(Debug, Clone, PartialEq)]
8377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8379#[cfg_attr(feature = "ts", derive(TS))]
8380#[cfg_attr(feature = "ts", ts(export))]
8381pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8382    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8383    pub point_x: f32,
8384    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8385    pub point_y: f32,
8386    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8387    pub radius: f32,
8388    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8389    pub rec_top_x: f32,
8390    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8391    pub rec_top_y: f32,
8392    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8393    pub rec_bottom_x: f32,
8394    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8395    pub rec_bottom_y: f32,
8396    #[doc = "Current tracking status"]
8397    pub tracking_status: CameraTrackingStatusFlags,
8398    #[doc = "Current tracking mode"]
8399    pub tracking_mode: CameraTrackingMode,
8400    #[doc = "Defines location of target data"]
8401    pub target_data: CameraTrackingTargetData,
8402    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8403    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8404    pub camera_device_id: u8,
8405}
8406impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8407    pub const ENCODED_LEN: usize = 32usize;
8408    pub const DEFAULT: Self = Self {
8409        point_x: 0.0_f32,
8410        point_y: 0.0_f32,
8411        radius: 0.0_f32,
8412        rec_top_x: 0.0_f32,
8413        rec_top_y: 0.0_f32,
8414        rec_bottom_x: 0.0_f32,
8415        rec_bottom_y: 0.0_f32,
8416        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8417        tracking_mode: CameraTrackingMode::DEFAULT,
8418        target_data: CameraTrackingTargetData::DEFAULT,
8419        camera_device_id: 0_u8,
8420    };
8421    #[cfg(feature = "arbitrary")]
8422    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8423        use arbitrary::{Arbitrary, Unstructured};
8424        let mut buf = [0u8; 1024];
8425        rng.fill_bytes(&mut buf);
8426        let mut unstructured = Unstructured::new(&buf);
8427        Self::arbitrary(&mut unstructured).unwrap_or_default()
8428    }
8429}
8430impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8431    fn default() -> Self {
8432        Self::DEFAULT.clone()
8433    }
8434}
8435impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8436    type Message = MavMessage;
8437    const ID: u32 = 275u32;
8438    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8439    const EXTRA_CRC: u8 = 126u8;
8440    const ENCODED_LEN: usize = 32usize;
8441    fn deser(
8442        _version: MavlinkVersion,
8443        __input: &[u8],
8444    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8445        let avail_len = __input.len();
8446        let mut payload_buf = [0; Self::ENCODED_LEN];
8447        let mut buf = if avail_len < Self::ENCODED_LEN {
8448            payload_buf[0..avail_len].copy_from_slice(__input);
8449            Bytes::new(&payload_buf)
8450        } else {
8451            Bytes::new(__input)
8452        };
8453        let mut __struct = Self::default();
8454        __struct.point_x = buf.get_f32_le()?;
8455        __struct.point_y = buf.get_f32_le()?;
8456        __struct.radius = buf.get_f32_le()?;
8457        __struct.rec_top_x = buf.get_f32_le()?;
8458        __struct.rec_top_y = buf.get_f32_le()?;
8459        __struct.rec_bottom_x = buf.get_f32_le()?;
8460        __struct.rec_bottom_y = buf.get_f32_le()?;
8461        let tmp = buf.get_u8()?;
8462        __struct.tracking_status =
8463            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8464                enum_type: "CameraTrackingStatusFlags",
8465                value: tmp as u64,
8466            })?;
8467        let tmp = buf.get_u8()?;
8468        __struct.tracking_mode =
8469            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8470                enum_type: "CameraTrackingMode",
8471                value: tmp as u64,
8472            })?;
8473        let tmp = buf.get_u8()?;
8474        __struct.target_data =
8475            CameraTrackingTargetData::from_bits(tmp as <CameraTrackingTargetData as Flags>::Bits)
8476                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8477                flag_type: "CameraTrackingTargetData",
8478                value: tmp as u64,
8479            })?;
8480        __struct.camera_device_id = buf.get_u8()?;
8481        Ok(__struct)
8482    }
8483    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8484        let mut __tmp = BytesMut::new(bytes);
8485        #[allow(clippy::absurd_extreme_comparisons)]
8486        #[allow(unused_comparisons)]
8487        if __tmp.remaining() < Self::ENCODED_LEN {
8488            panic!(
8489                "buffer is too small (need {} bytes, but got {})",
8490                Self::ENCODED_LEN,
8491                __tmp.remaining(),
8492            )
8493        }
8494        __tmp.put_f32_le(self.point_x);
8495        __tmp.put_f32_le(self.point_y);
8496        __tmp.put_f32_le(self.radius);
8497        __tmp.put_f32_le(self.rec_top_x);
8498        __tmp.put_f32_le(self.rec_top_y);
8499        __tmp.put_f32_le(self.rec_bottom_x);
8500        __tmp.put_f32_le(self.rec_bottom_y);
8501        __tmp.put_u8(self.tracking_status as u8);
8502        __tmp.put_u8(self.tracking_mode as u8);
8503        __tmp.put_u8(self.target_data.bits() as u8);
8504        if matches!(version, MavlinkVersion::V2) {
8505            __tmp.put_u8(self.camera_device_id);
8506            let len = __tmp.len();
8507            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8508        } else {
8509            __tmp.len()
8510        }
8511    }
8512}
8513#[doc = "Camera-IMU triggering and synchronisation message."]
8514#[doc = ""]
8515#[doc = "ID: 112"]
8516#[derive(Debug, Clone, PartialEq)]
8517#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8519#[cfg_attr(feature = "ts", derive(TS))]
8520#[cfg_attr(feature = "ts", ts(export))]
8521pub struct CAMERA_TRIGGER_DATA {
8522    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8523    pub time_usec: u64,
8524    #[doc = "Image frame sequence"]
8525    pub seq: u32,
8526}
8527impl CAMERA_TRIGGER_DATA {
8528    pub const ENCODED_LEN: usize = 12usize;
8529    pub const DEFAULT: Self = Self {
8530        time_usec: 0_u64,
8531        seq: 0_u32,
8532    };
8533    #[cfg(feature = "arbitrary")]
8534    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8535        use arbitrary::{Arbitrary, Unstructured};
8536        let mut buf = [0u8; 1024];
8537        rng.fill_bytes(&mut buf);
8538        let mut unstructured = Unstructured::new(&buf);
8539        Self::arbitrary(&mut unstructured).unwrap_or_default()
8540    }
8541}
8542impl Default for CAMERA_TRIGGER_DATA {
8543    fn default() -> Self {
8544        Self::DEFAULT.clone()
8545    }
8546}
8547impl MessageData for CAMERA_TRIGGER_DATA {
8548    type Message = MavMessage;
8549    const ID: u32 = 112u32;
8550    const NAME: &'static str = "CAMERA_TRIGGER";
8551    const EXTRA_CRC: u8 = 174u8;
8552    const ENCODED_LEN: usize = 12usize;
8553    fn deser(
8554        _version: MavlinkVersion,
8555        __input: &[u8],
8556    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8557        let avail_len = __input.len();
8558        let mut payload_buf = [0; Self::ENCODED_LEN];
8559        let mut buf = if avail_len < Self::ENCODED_LEN {
8560            payload_buf[0..avail_len].copy_from_slice(__input);
8561            Bytes::new(&payload_buf)
8562        } else {
8563            Bytes::new(__input)
8564        };
8565        let mut __struct = Self::default();
8566        __struct.time_usec = buf.get_u64_le()?;
8567        __struct.seq = buf.get_u32_le()?;
8568        Ok(__struct)
8569    }
8570    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8571        let mut __tmp = BytesMut::new(bytes);
8572        #[allow(clippy::absurd_extreme_comparisons)]
8573        #[allow(unused_comparisons)]
8574        if __tmp.remaining() < Self::ENCODED_LEN {
8575            panic!(
8576                "buffer is too small (need {} bytes, but got {})",
8577                Self::ENCODED_LEN,
8578                __tmp.remaining(),
8579            )
8580        }
8581        __tmp.put_u64_le(self.time_usec);
8582        __tmp.put_u32_le(self.seq);
8583        if matches!(version, MavlinkVersion::V2) {
8584            let len = __tmp.len();
8585            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8586        } else {
8587            __tmp.len()
8588        }
8589    }
8590}
8591#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8592#[doc = ""]
8593#[doc = "ID: 387"]
8594#[derive(Debug, Clone, PartialEq)]
8595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8597#[cfg_attr(feature = "ts", derive(TS))]
8598#[cfg_attr(feature = "ts", ts(export))]
8599pub struct CANFD_FRAME_DATA {
8600    #[doc = "Frame ID"]
8601    pub id: u32,
8602    #[doc = "System ID."]
8603    pub target_system: u8,
8604    #[doc = "Component ID."]
8605    pub target_component: u8,
8606    #[doc = "bus number"]
8607    pub bus: u8,
8608    #[doc = "Frame length"]
8609    pub len: u8,
8610    #[doc = "Frame data"]
8611    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8612    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8613    pub data: [u8; 64],
8614}
8615impl CANFD_FRAME_DATA {
8616    pub const ENCODED_LEN: usize = 72usize;
8617    pub const DEFAULT: Self = Self {
8618        id: 0_u32,
8619        target_system: 0_u8,
8620        target_component: 0_u8,
8621        bus: 0_u8,
8622        len: 0_u8,
8623        data: [0_u8; 64usize],
8624    };
8625    #[cfg(feature = "arbitrary")]
8626    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8627        use arbitrary::{Arbitrary, Unstructured};
8628        let mut buf = [0u8; 1024];
8629        rng.fill_bytes(&mut buf);
8630        let mut unstructured = Unstructured::new(&buf);
8631        Self::arbitrary(&mut unstructured).unwrap_or_default()
8632    }
8633}
8634impl Default for CANFD_FRAME_DATA {
8635    fn default() -> Self {
8636        Self::DEFAULT.clone()
8637    }
8638}
8639impl MessageData for CANFD_FRAME_DATA {
8640    type Message = MavMessage;
8641    const ID: u32 = 387u32;
8642    const NAME: &'static str = "CANFD_FRAME";
8643    const EXTRA_CRC: u8 = 4u8;
8644    const ENCODED_LEN: usize = 72usize;
8645    fn deser(
8646        _version: MavlinkVersion,
8647        __input: &[u8],
8648    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8649        let avail_len = __input.len();
8650        let mut payload_buf = [0; Self::ENCODED_LEN];
8651        let mut buf = if avail_len < Self::ENCODED_LEN {
8652            payload_buf[0..avail_len].copy_from_slice(__input);
8653            Bytes::new(&payload_buf)
8654        } else {
8655            Bytes::new(__input)
8656        };
8657        let mut __struct = Self::default();
8658        __struct.id = buf.get_u32_le()?;
8659        __struct.target_system = buf.get_u8()?;
8660        __struct.target_component = buf.get_u8()?;
8661        __struct.bus = buf.get_u8()?;
8662        __struct.len = buf.get_u8()?;
8663        for v in &mut __struct.data {
8664            let val = buf.get_u8()?;
8665            *v = val;
8666        }
8667        Ok(__struct)
8668    }
8669    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8670        let mut __tmp = BytesMut::new(bytes);
8671        #[allow(clippy::absurd_extreme_comparisons)]
8672        #[allow(unused_comparisons)]
8673        if __tmp.remaining() < Self::ENCODED_LEN {
8674            panic!(
8675                "buffer is too small (need {} bytes, but got {})",
8676                Self::ENCODED_LEN,
8677                __tmp.remaining(),
8678            )
8679        }
8680        __tmp.put_u32_le(self.id);
8681        __tmp.put_u8(self.target_system);
8682        __tmp.put_u8(self.target_component);
8683        __tmp.put_u8(self.bus);
8684        __tmp.put_u8(self.len);
8685        for val in &self.data {
8686            __tmp.put_u8(*val);
8687        }
8688        if matches!(version, MavlinkVersion::V2) {
8689            let len = __tmp.len();
8690            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8691        } else {
8692            __tmp.len()
8693        }
8694    }
8695}
8696#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8697#[doc = ""]
8698#[doc = "ID: 388"]
8699#[derive(Debug, Clone, PartialEq)]
8700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8702#[cfg_attr(feature = "ts", derive(TS))]
8703#[cfg_attr(feature = "ts", ts(export))]
8704pub struct CAN_FILTER_MODIFY_DATA {
8705    #[doc = "filter IDs, length num_ids"]
8706    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8707    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8708    pub ids: [u16; 16],
8709    #[doc = "System ID."]
8710    pub target_system: u8,
8711    #[doc = "Component ID."]
8712    pub target_component: u8,
8713    #[doc = "bus number"]
8714    pub bus: u8,
8715    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8716    pub operation: CanFilterOp,
8717    #[doc = "number of IDs in filter list"]
8718    pub num_ids: u8,
8719}
8720impl CAN_FILTER_MODIFY_DATA {
8721    pub const ENCODED_LEN: usize = 37usize;
8722    pub const DEFAULT: Self = Self {
8723        ids: [0_u16; 16usize],
8724        target_system: 0_u8,
8725        target_component: 0_u8,
8726        bus: 0_u8,
8727        operation: CanFilterOp::DEFAULT,
8728        num_ids: 0_u8,
8729    };
8730    #[cfg(feature = "arbitrary")]
8731    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8732        use arbitrary::{Arbitrary, Unstructured};
8733        let mut buf = [0u8; 1024];
8734        rng.fill_bytes(&mut buf);
8735        let mut unstructured = Unstructured::new(&buf);
8736        Self::arbitrary(&mut unstructured).unwrap_or_default()
8737    }
8738}
8739impl Default for CAN_FILTER_MODIFY_DATA {
8740    fn default() -> Self {
8741        Self::DEFAULT.clone()
8742    }
8743}
8744impl MessageData for CAN_FILTER_MODIFY_DATA {
8745    type Message = MavMessage;
8746    const ID: u32 = 388u32;
8747    const NAME: &'static str = "CAN_FILTER_MODIFY";
8748    const EXTRA_CRC: u8 = 8u8;
8749    const ENCODED_LEN: usize = 37usize;
8750    fn deser(
8751        _version: MavlinkVersion,
8752        __input: &[u8],
8753    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8754        let avail_len = __input.len();
8755        let mut payload_buf = [0; Self::ENCODED_LEN];
8756        let mut buf = if avail_len < Self::ENCODED_LEN {
8757            payload_buf[0..avail_len].copy_from_slice(__input);
8758            Bytes::new(&payload_buf)
8759        } else {
8760            Bytes::new(__input)
8761        };
8762        let mut __struct = Self::default();
8763        for v in &mut __struct.ids {
8764            let val = buf.get_u16_le()?;
8765            *v = val;
8766        }
8767        __struct.target_system = buf.get_u8()?;
8768        __struct.target_component = buf.get_u8()?;
8769        __struct.bus = buf.get_u8()?;
8770        let tmp = buf.get_u8()?;
8771        __struct.operation =
8772            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8773                enum_type: "CanFilterOp",
8774                value: tmp as u64,
8775            })?;
8776        __struct.num_ids = buf.get_u8()?;
8777        Ok(__struct)
8778    }
8779    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8780        let mut __tmp = BytesMut::new(bytes);
8781        #[allow(clippy::absurd_extreme_comparisons)]
8782        #[allow(unused_comparisons)]
8783        if __tmp.remaining() < Self::ENCODED_LEN {
8784            panic!(
8785                "buffer is too small (need {} bytes, but got {})",
8786                Self::ENCODED_LEN,
8787                __tmp.remaining(),
8788            )
8789        }
8790        for val in &self.ids {
8791            __tmp.put_u16_le(*val);
8792        }
8793        __tmp.put_u8(self.target_system);
8794        __tmp.put_u8(self.target_component);
8795        __tmp.put_u8(self.bus);
8796        __tmp.put_u8(self.operation as u8);
8797        __tmp.put_u8(self.num_ids);
8798        if matches!(version, MavlinkVersion::V2) {
8799            let len = __tmp.len();
8800            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8801        } else {
8802            __tmp.len()
8803        }
8804    }
8805}
8806#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8807#[doc = ""]
8808#[doc = "ID: 386"]
8809#[derive(Debug, Clone, PartialEq)]
8810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8812#[cfg_attr(feature = "ts", derive(TS))]
8813#[cfg_attr(feature = "ts", ts(export))]
8814pub struct CAN_FRAME_DATA {
8815    #[doc = "Frame ID"]
8816    pub id: u32,
8817    #[doc = "System ID."]
8818    pub target_system: u8,
8819    #[doc = "Component ID."]
8820    pub target_component: u8,
8821    #[doc = "Bus number"]
8822    pub bus: u8,
8823    #[doc = "Frame length"]
8824    pub len: u8,
8825    #[doc = "Frame data"]
8826    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8827    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8828    pub data: [u8; 8],
8829}
8830impl CAN_FRAME_DATA {
8831    pub const ENCODED_LEN: usize = 16usize;
8832    pub const DEFAULT: Self = Self {
8833        id: 0_u32,
8834        target_system: 0_u8,
8835        target_component: 0_u8,
8836        bus: 0_u8,
8837        len: 0_u8,
8838        data: [0_u8; 8usize],
8839    };
8840    #[cfg(feature = "arbitrary")]
8841    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8842        use arbitrary::{Arbitrary, Unstructured};
8843        let mut buf = [0u8; 1024];
8844        rng.fill_bytes(&mut buf);
8845        let mut unstructured = Unstructured::new(&buf);
8846        Self::arbitrary(&mut unstructured).unwrap_or_default()
8847    }
8848}
8849impl Default for CAN_FRAME_DATA {
8850    fn default() -> Self {
8851        Self::DEFAULT.clone()
8852    }
8853}
8854impl MessageData for CAN_FRAME_DATA {
8855    type Message = MavMessage;
8856    const ID: u32 = 386u32;
8857    const NAME: &'static str = "CAN_FRAME";
8858    const EXTRA_CRC: u8 = 132u8;
8859    const ENCODED_LEN: usize = 16usize;
8860    fn deser(
8861        _version: MavlinkVersion,
8862        __input: &[u8],
8863    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8864        let avail_len = __input.len();
8865        let mut payload_buf = [0; Self::ENCODED_LEN];
8866        let mut buf = if avail_len < Self::ENCODED_LEN {
8867            payload_buf[0..avail_len].copy_from_slice(__input);
8868            Bytes::new(&payload_buf)
8869        } else {
8870            Bytes::new(__input)
8871        };
8872        let mut __struct = Self::default();
8873        __struct.id = buf.get_u32_le()?;
8874        __struct.target_system = buf.get_u8()?;
8875        __struct.target_component = buf.get_u8()?;
8876        __struct.bus = buf.get_u8()?;
8877        __struct.len = buf.get_u8()?;
8878        for v in &mut __struct.data {
8879            let val = buf.get_u8()?;
8880            *v = val;
8881        }
8882        Ok(__struct)
8883    }
8884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8885        let mut __tmp = BytesMut::new(bytes);
8886        #[allow(clippy::absurd_extreme_comparisons)]
8887        #[allow(unused_comparisons)]
8888        if __tmp.remaining() < Self::ENCODED_LEN {
8889            panic!(
8890                "buffer is too small (need {} bytes, but got {})",
8891                Self::ENCODED_LEN,
8892                __tmp.remaining(),
8893            )
8894        }
8895        __tmp.put_u32_le(self.id);
8896        __tmp.put_u8(self.target_system);
8897        __tmp.put_u8(self.target_component);
8898        __tmp.put_u8(self.bus);
8899        __tmp.put_u8(self.len);
8900        for val in &self.data {
8901            __tmp.put_u8(*val);
8902        }
8903        if matches!(version, MavlinkVersion::V2) {
8904            let len = __tmp.len();
8905            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8906        } else {
8907            __tmp.len()
8908        }
8909    }
8910}
8911#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8912#[doc = ""]
8913#[doc = "ID: 336"]
8914#[derive(Debug, Clone, PartialEq)]
8915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8916#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8917#[cfg_attr(feature = "ts", derive(TS))]
8918#[cfg_attr(feature = "ts", ts(export))]
8919pub struct CELLULAR_CONFIG_DATA {
8920    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8921    pub enable_lte: u8,
8922    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8923    pub enable_pin: u8,
8924    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8925    #[cfg_attr(feature = "ts", ts(type = "string"))]
8926    pub pin: CharArray<16>,
8927    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8928    #[cfg_attr(feature = "ts", ts(type = "string"))]
8929    pub new_pin: CharArray<16>,
8930    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8931    #[cfg_attr(feature = "ts", ts(type = "string"))]
8932    pub apn: CharArray<32>,
8933    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8934    #[cfg_attr(feature = "ts", ts(type = "string"))]
8935    pub puk: CharArray<16>,
8936    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8937    pub roaming: u8,
8938    #[doc = "Message acceptance response (sent back to GS)."]
8939    pub response: CellularConfigResponse,
8940}
8941impl CELLULAR_CONFIG_DATA {
8942    pub const ENCODED_LEN: usize = 84usize;
8943    pub const DEFAULT: Self = Self {
8944        enable_lte: 0_u8,
8945        enable_pin: 0_u8,
8946        pin: CharArray::new([0_u8; 16usize]),
8947        new_pin: CharArray::new([0_u8; 16usize]),
8948        apn: CharArray::new([0_u8; 32usize]),
8949        puk: CharArray::new([0_u8; 16usize]),
8950        roaming: 0_u8,
8951        response: CellularConfigResponse::DEFAULT,
8952    };
8953    #[cfg(feature = "arbitrary")]
8954    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8955        use arbitrary::{Arbitrary, Unstructured};
8956        let mut buf = [0u8; 1024];
8957        rng.fill_bytes(&mut buf);
8958        let mut unstructured = Unstructured::new(&buf);
8959        Self::arbitrary(&mut unstructured).unwrap_or_default()
8960    }
8961}
8962impl Default for CELLULAR_CONFIG_DATA {
8963    fn default() -> Self {
8964        Self::DEFAULT.clone()
8965    }
8966}
8967impl MessageData for CELLULAR_CONFIG_DATA {
8968    type Message = MavMessage;
8969    const ID: u32 = 336u32;
8970    const NAME: &'static str = "CELLULAR_CONFIG";
8971    const EXTRA_CRC: u8 = 245u8;
8972    const ENCODED_LEN: usize = 84usize;
8973    fn deser(
8974        _version: MavlinkVersion,
8975        __input: &[u8],
8976    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8977        let avail_len = __input.len();
8978        let mut payload_buf = [0; Self::ENCODED_LEN];
8979        let mut buf = if avail_len < Self::ENCODED_LEN {
8980            payload_buf[0..avail_len].copy_from_slice(__input);
8981            Bytes::new(&payload_buf)
8982        } else {
8983            Bytes::new(__input)
8984        };
8985        let mut __struct = Self::default();
8986        __struct.enable_lte = buf.get_u8()?;
8987        __struct.enable_pin = buf.get_u8()?;
8988        let mut tmp = [0_u8; 16usize];
8989        for v in &mut tmp {
8990            *v = buf.get_u8()?;
8991        }
8992        __struct.pin = CharArray::new(tmp);
8993        let mut tmp = [0_u8; 16usize];
8994        for v in &mut tmp {
8995            *v = buf.get_u8()?;
8996        }
8997        __struct.new_pin = CharArray::new(tmp);
8998        let mut tmp = [0_u8; 32usize];
8999        for v in &mut tmp {
9000            *v = buf.get_u8()?;
9001        }
9002        __struct.apn = CharArray::new(tmp);
9003        let mut tmp = [0_u8; 16usize];
9004        for v in &mut tmp {
9005            *v = buf.get_u8()?;
9006        }
9007        __struct.puk = CharArray::new(tmp);
9008        __struct.roaming = buf.get_u8()?;
9009        let tmp = buf.get_u8()?;
9010        __struct.response =
9011            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9012                enum_type: "CellularConfigResponse",
9013                value: tmp as u64,
9014            })?;
9015        Ok(__struct)
9016    }
9017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9018        let mut __tmp = BytesMut::new(bytes);
9019        #[allow(clippy::absurd_extreme_comparisons)]
9020        #[allow(unused_comparisons)]
9021        if __tmp.remaining() < Self::ENCODED_LEN {
9022            panic!(
9023                "buffer is too small (need {} bytes, but got {})",
9024                Self::ENCODED_LEN,
9025                __tmp.remaining(),
9026            )
9027        }
9028        __tmp.put_u8(self.enable_lte);
9029        __tmp.put_u8(self.enable_pin);
9030        for val in &self.pin {
9031            __tmp.put_u8(*val);
9032        }
9033        for val in &self.new_pin {
9034            __tmp.put_u8(*val);
9035        }
9036        for val in &self.apn {
9037            __tmp.put_u8(*val);
9038        }
9039        for val in &self.puk {
9040            __tmp.put_u8(*val);
9041        }
9042        __tmp.put_u8(self.roaming);
9043        __tmp.put_u8(self.response as u8);
9044        if matches!(version, MavlinkVersion::V2) {
9045            let len = __tmp.len();
9046            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9047        } else {
9048            __tmp.len()
9049        }
9050    }
9051}
9052#[doc = "Report current used cellular network status."]
9053#[doc = ""]
9054#[doc = "ID: 334"]
9055#[derive(Debug, Clone, PartialEq)]
9056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9057#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9058#[cfg_attr(feature = "ts", derive(TS))]
9059#[cfg_attr(feature = "ts", ts(export))]
9060pub struct CELLULAR_STATUS_DATA {
9061    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
9062    pub mcc: u16,
9063    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
9064    pub mnc: u16,
9065    #[doc = "Location area code. If unknown, set to 0"]
9066    pub lac: u16,
9067    #[doc = "Cellular modem status"]
9068    pub status: CellularStatusFlag,
9069    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
9070    pub failure_reason: CellularNetworkFailedReason,
9071    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
9072    pub mavtype: CellularNetworkRadioType,
9073    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
9074    pub quality: u8,
9075}
9076impl CELLULAR_STATUS_DATA {
9077    pub const ENCODED_LEN: usize = 10usize;
9078    pub const DEFAULT: Self = Self {
9079        mcc: 0_u16,
9080        mnc: 0_u16,
9081        lac: 0_u16,
9082        status: CellularStatusFlag::DEFAULT,
9083        failure_reason: CellularNetworkFailedReason::DEFAULT,
9084        mavtype: CellularNetworkRadioType::DEFAULT,
9085        quality: 0_u8,
9086    };
9087    #[cfg(feature = "arbitrary")]
9088    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9089        use arbitrary::{Arbitrary, Unstructured};
9090        let mut buf = [0u8; 1024];
9091        rng.fill_bytes(&mut buf);
9092        let mut unstructured = Unstructured::new(&buf);
9093        Self::arbitrary(&mut unstructured).unwrap_or_default()
9094    }
9095}
9096impl Default for CELLULAR_STATUS_DATA {
9097    fn default() -> Self {
9098        Self::DEFAULT.clone()
9099    }
9100}
9101impl MessageData for CELLULAR_STATUS_DATA {
9102    type Message = MavMessage;
9103    const ID: u32 = 334u32;
9104    const NAME: &'static str = "CELLULAR_STATUS";
9105    const EXTRA_CRC: u8 = 72u8;
9106    const ENCODED_LEN: usize = 10usize;
9107    fn deser(
9108        _version: MavlinkVersion,
9109        __input: &[u8],
9110    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9111        let avail_len = __input.len();
9112        let mut payload_buf = [0; Self::ENCODED_LEN];
9113        let mut buf = if avail_len < Self::ENCODED_LEN {
9114            payload_buf[0..avail_len].copy_from_slice(__input);
9115            Bytes::new(&payload_buf)
9116        } else {
9117            Bytes::new(__input)
9118        };
9119        let mut __struct = Self::default();
9120        __struct.mcc = buf.get_u16_le()?;
9121        __struct.mnc = buf.get_u16_le()?;
9122        __struct.lac = buf.get_u16_le()?;
9123        let tmp = buf.get_u8()?;
9124        __struct.status =
9125            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9126                enum_type: "CellularStatusFlag",
9127                value: tmp as u64,
9128            })?;
9129        let tmp = buf.get_u8()?;
9130        __struct.failure_reason =
9131            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9132                enum_type: "CellularNetworkFailedReason",
9133                value: tmp as u64,
9134            })?;
9135        let tmp = buf.get_u8()?;
9136        __struct.mavtype =
9137            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9138                enum_type: "CellularNetworkRadioType",
9139                value: tmp as u64,
9140            })?;
9141        __struct.quality = buf.get_u8()?;
9142        Ok(__struct)
9143    }
9144    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9145        let mut __tmp = BytesMut::new(bytes);
9146        #[allow(clippy::absurd_extreme_comparisons)]
9147        #[allow(unused_comparisons)]
9148        if __tmp.remaining() < Self::ENCODED_LEN {
9149            panic!(
9150                "buffer is too small (need {} bytes, but got {})",
9151                Self::ENCODED_LEN,
9152                __tmp.remaining(),
9153            )
9154        }
9155        __tmp.put_u16_le(self.mcc);
9156        __tmp.put_u16_le(self.mnc);
9157        __tmp.put_u16_le(self.lac);
9158        __tmp.put_u8(self.status as u8);
9159        __tmp.put_u8(self.failure_reason as u8);
9160        __tmp.put_u8(self.mavtype as u8);
9161        __tmp.put_u8(self.quality);
9162        if matches!(version, MavlinkVersion::V2) {
9163            let len = __tmp.len();
9164            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9165        } else {
9166            __tmp.len()
9167        }
9168    }
9169}
9170#[doc = "Request to control this MAV."]
9171#[doc = ""]
9172#[doc = "ID: 5"]
9173#[derive(Debug, Clone, PartialEq)]
9174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9175#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9176#[cfg_attr(feature = "ts", derive(TS))]
9177#[cfg_attr(feature = "ts", ts(export))]
9178pub struct CHANGE_OPERATOR_CONTROL_DATA {
9179    #[doc = "System the GCS requests control for"]
9180    pub target_system: u8,
9181    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9182    pub control_request: u8,
9183    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
9184    pub version: u8,
9185    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
9186    #[cfg_attr(feature = "ts", ts(type = "string"))]
9187    pub passkey: CharArray<25>,
9188}
9189impl CHANGE_OPERATOR_CONTROL_DATA {
9190    pub const ENCODED_LEN: usize = 28usize;
9191    pub const DEFAULT: Self = Self {
9192        target_system: 0_u8,
9193        control_request: 0_u8,
9194        version: 0_u8,
9195        passkey: CharArray::new([0_u8; 25usize]),
9196    };
9197    #[cfg(feature = "arbitrary")]
9198    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9199        use arbitrary::{Arbitrary, Unstructured};
9200        let mut buf = [0u8; 1024];
9201        rng.fill_bytes(&mut buf);
9202        let mut unstructured = Unstructured::new(&buf);
9203        Self::arbitrary(&mut unstructured).unwrap_or_default()
9204    }
9205}
9206impl Default for CHANGE_OPERATOR_CONTROL_DATA {
9207    fn default() -> Self {
9208        Self::DEFAULT.clone()
9209    }
9210}
9211impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
9212    type Message = MavMessage;
9213    const ID: u32 = 5u32;
9214    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
9215    const EXTRA_CRC: u8 = 217u8;
9216    const ENCODED_LEN: usize = 28usize;
9217    fn deser(
9218        _version: MavlinkVersion,
9219        __input: &[u8],
9220    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9221        let avail_len = __input.len();
9222        let mut payload_buf = [0; Self::ENCODED_LEN];
9223        let mut buf = if avail_len < Self::ENCODED_LEN {
9224            payload_buf[0..avail_len].copy_from_slice(__input);
9225            Bytes::new(&payload_buf)
9226        } else {
9227            Bytes::new(__input)
9228        };
9229        let mut __struct = Self::default();
9230        __struct.target_system = buf.get_u8()?;
9231        __struct.control_request = buf.get_u8()?;
9232        __struct.version = buf.get_u8()?;
9233        let mut tmp = [0_u8; 25usize];
9234        for v in &mut tmp {
9235            *v = buf.get_u8()?;
9236        }
9237        __struct.passkey = CharArray::new(tmp);
9238        Ok(__struct)
9239    }
9240    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9241        let mut __tmp = BytesMut::new(bytes);
9242        #[allow(clippy::absurd_extreme_comparisons)]
9243        #[allow(unused_comparisons)]
9244        if __tmp.remaining() < Self::ENCODED_LEN {
9245            panic!(
9246                "buffer is too small (need {} bytes, but got {})",
9247                Self::ENCODED_LEN,
9248                __tmp.remaining(),
9249            )
9250        }
9251        __tmp.put_u8(self.target_system);
9252        __tmp.put_u8(self.control_request);
9253        __tmp.put_u8(self.version);
9254        for val in &self.passkey {
9255            __tmp.put_u8(*val);
9256        }
9257        if matches!(version, MavlinkVersion::V2) {
9258            let len = __tmp.len();
9259            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9260        } else {
9261            __tmp.len()
9262        }
9263    }
9264}
9265#[doc = "Accept / deny control of this MAV."]
9266#[doc = ""]
9267#[doc = "ID: 6"]
9268#[derive(Debug, Clone, PartialEq)]
9269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9271#[cfg_attr(feature = "ts", derive(TS))]
9272#[cfg_attr(feature = "ts", ts(export))]
9273pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
9274    #[doc = "ID of the GCS this message"]
9275    pub gcs_system_id: u8,
9276    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9277    pub control_request: u8,
9278    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
9279    pub ack: u8,
9280}
9281impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
9282    pub const ENCODED_LEN: usize = 3usize;
9283    pub const DEFAULT: Self = Self {
9284        gcs_system_id: 0_u8,
9285        control_request: 0_u8,
9286        ack: 0_u8,
9287    };
9288    #[cfg(feature = "arbitrary")]
9289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9290        use arbitrary::{Arbitrary, Unstructured};
9291        let mut buf = [0u8; 1024];
9292        rng.fill_bytes(&mut buf);
9293        let mut unstructured = Unstructured::new(&buf);
9294        Self::arbitrary(&mut unstructured).unwrap_or_default()
9295    }
9296}
9297impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9298    fn default() -> Self {
9299        Self::DEFAULT.clone()
9300    }
9301}
9302impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9303    type Message = MavMessage;
9304    const ID: u32 = 6u32;
9305    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
9306    const EXTRA_CRC: u8 = 104u8;
9307    const ENCODED_LEN: usize = 3usize;
9308    fn deser(
9309        _version: MavlinkVersion,
9310        __input: &[u8],
9311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9312        let avail_len = __input.len();
9313        let mut payload_buf = [0; Self::ENCODED_LEN];
9314        let mut buf = if avail_len < Self::ENCODED_LEN {
9315            payload_buf[0..avail_len].copy_from_slice(__input);
9316            Bytes::new(&payload_buf)
9317        } else {
9318            Bytes::new(__input)
9319        };
9320        let mut __struct = Self::default();
9321        __struct.gcs_system_id = buf.get_u8()?;
9322        __struct.control_request = buf.get_u8()?;
9323        __struct.ack = buf.get_u8()?;
9324        Ok(__struct)
9325    }
9326    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9327        let mut __tmp = BytesMut::new(bytes);
9328        #[allow(clippy::absurd_extreme_comparisons)]
9329        #[allow(unused_comparisons)]
9330        if __tmp.remaining() < Self::ENCODED_LEN {
9331            panic!(
9332                "buffer is too small (need {} bytes, but got {})",
9333                Self::ENCODED_LEN,
9334                __tmp.remaining(),
9335            )
9336        }
9337        __tmp.put_u8(self.gcs_system_id);
9338        __tmp.put_u8(self.control_request);
9339        __tmp.put_u8(self.ack);
9340        if matches!(version, MavlinkVersion::V2) {
9341            let len = __tmp.len();
9342            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9343        } else {
9344            __tmp.len()
9345        }
9346    }
9347}
9348#[doc = "Information about a potential collision."]
9349#[doc = ""]
9350#[doc = "ID: 247"]
9351#[derive(Debug, Clone, PartialEq)]
9352#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9353#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9354#[cfg_attr(feature = "ts", derive(TS))]
9355#[cfg_attr(feature = "ts", ts(export))]
9356pub struct COLLISION_DATA {
9357    #[doc = "Unique identifier, domain based on src field"]
9358    pub id: u32,
9359    #[doc = "Estimated time until collision occurs"]
9360    pub time_to_minimum_delta: f32,
9361    #[doc = "Closest vertical distance between vehicle and object"]
9362    pub altitude_minimum_delta: f32,
9363    #[doc = "Closest horizontal distance between vehicle and object"]
9364    pub horizontal_minimum_delta: f32,
9365    #[doc = "Collision data source"]
9366    pub src: MavCollisionSrc,
9367    #[doc = "Action that is being taken to avoid this collision"]
9368    pub action: MavCollisionAction,
9369    #[doc = "How concerned the aircraft is about this collision"]
9370    pub threat_level: MavCollisionThreatLevel,
9371}
9372impl COLLISION_DATA {
9373    pub const ENCODED_LEN: usize = 19usize;
9374    pub const DEFAULT: Self = Self {
9375        id: 0_u32,
9376        time_to_minimum_delta: 0.0_f32,
9377        altitude_minimum_delta: 0.0_f32,
9378        horizontal_minimum_delta: 0.0_f32,
9379        src: MavCollisionSrc::DEFAULT,
9380        action: MavCollisionAction::DEFAULT,
9381        threat_level: MavCollisionThreatLevel::DEFAULT,
9382    };
9383    #[cfg(feature = "arbitrary")]
9384    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9385        use arbitrary::{Arbitrary, Unstructured};
9386        let mut buf = [0u8; 1024];
9387        rng.fill_bytes(&mut buf);
9388        let mut unstructured = Unstructured::new(&buf);
9389        Self::arbitrary(&mut unstructured).unwrap_or_default()
9390    }
9391}
9392impl Default for COLLISION_DATA {
9393    fn default() -> Self {
9394        Self::DEFAULT.clone()
9395    }
9396}
9397impl MessageData for COLLISION_DATA {
9398    type Message = MavMessage;
9399    const ID: u32 = 247u32;
9400    const NAME: &'static str = "COLLISION";
9401    const EXTRA_CRC: u8 = 81u8;
9402    const ENCODED_LEN: usize = 19usize;
9403    fn deser(
9404        _version: MavlinkVersion,
9405        __input: &[u8],
9406    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9407        let avail_len = __input.len();
9408        let mut payload_buf = [0; Self::ENCODED_LEN];
9409        let mut buf = if avail_len < Self::ENCODED_LEN {
9410            payload_buf[0..avail_len].copy_from_slice(__input);
9411            Bytes::new(&payload_buf)
9412        } else {
9413            Bytes::new(__input)
9414        };
9415        let mut __struct = Self::default();
9416        __struct.id = buf.get_u32_le()?;
9417        __struct.time_to_minimum_delta = buf.get_f32_le()?;
9418        __struct.altitude_minimum_delta = buf.get_f32_le()?;
9419        __struct.horizontal_minimum_delta = buf.get_f32_le()?;
9420        let tmp = buf.get_u8()?;
9421        __struct.src =
9422            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9423                enum_type: "MavCollisionSrc",
9424                value: tmp as u64,
9425            })?;
9426        let tmp = buf.get_u8()?;
9427        __struct.action =
9428            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9429                enum_type: "MavCollisionAction",
9430                value: tmp as u64,
9431            })?;
9432        let tmp = buf.get_u8()?;
9433        __struct.threat_level =
9434            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9435                enum_type: "MavCollisionThreatLevel",
9436                value: tmp as u64,
9437            })?;
9438        Ok(__struct)
9439    }
9440    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9441        let mut __tmp = BytesMut::new(bytes);
9442        #[allow(clippy::absurd_extreme_comparisons)]
9443        #[allow(unused_comparisons)]
9444        if __tmp.remaining() < Self::ENCODED_LEN {
9445            panic!(
9446                "buffer is too small (need {} bytes, but got {})",
9447                Self::ENCODED_LEN,
9448                __tmp.remaining(),
9449            )
9450        }
9451        __tmp.put_u32_le(self.id);
9452        __tmp.put_f32_le(self.time_to_minimum_delta);
9453        __tmp.put_f32_le(self.altitude_minimum_delta);
9454        __tmp.put_f32_le(self.horizontal_minimum_delta);
9455        __tmp.put_u8(self.src as u8);
9456        __tmp.put_u8(self.action as u8);
9457        __tmp.put_u8(self.threat_level as u8);
9458        if matches!(version, MavlinkVersion::V2) {
9459            let len = __tmp.len();
9460            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9461        } else {
9462            __tmp.len()
9463        }
9464    }
9465}
9466#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9467#[doc = ""]
9468#[doc = "ID: 77"]
9469#[derive(Debug, Clone, PartialEq)]
9470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9472#[cfg_attr(feature = "ts", derive(TS))]
9473#[cfg_attr(feature = "ts", ts(export))]
9474pub struct COMMAND_ACK_DATA {
9475    #[doc = "Command ID (of acknowledged command)."]
9476    pub command: MavCmd,
9477    #[doc = "Result of command."]
9478    pub result: MavResult,
9479    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9480    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9481    pub progress: u8,
9482    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9483    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9484    pub result_param2: i32,
9485    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9486    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9487    pub target_system: u8,
9488    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9489    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9490    pub target_component: u8,
9491}
9492impl COMMAND_ACK_DATA {
9493    pub const ENCODED_LEN: usize = 10usize;
9494    pub const DEFAULT: Self = Self {
9495        command: MavCmd::DEFAULT,
9496        result: MavResult::DEFAULT,
9497        progress: 0_u8,
9498        result_param2: 0_i32,
9499        target_system: 0_u8,
9500        target_component: 0_u8,
9501    };
9502    #[cfg(feature = "arbitrary")]
9503    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9504        use arbitrary::{Arbitrary, Unstructured};
9505        let mut buf = [0u8; 1024];
9506        rng.fill_bytes(&mut buf);
9507        let mut unstructured = Unstructured::new(&buf);
9508        Self::arbitrary(&mut unstructured).unwrap_or_default()
9509    }
9510}
9511impl Default for COMMAND_ACK_DATA {
9512    fn default() -> Self {
9513        Self::DEFAULT.clone()
9514    }
9515}
9516impl MessageData for COMMAND_ACK_DATA {
9517    type Message = MavMessage;
9518    const ID: u32 = 77u32;
9519    const NAME: &'static str = "COMMAND_ACK";
9520    const EXTRA_CRC: u8 = 143u8;
9521    const ENCODED_LEN: usize = 10usize;
9522    fn deser(
9523        _version: MavlinkVersion,
9524        __input: &[u8],
9525    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9526        let avail_len = __input.len();
9527        let mut payload_buf = [0; Self::ENCODED_LEN];
9528        let mut buf = if avail_len < Self::ENCODED_LEN {
9529            payload_buf[0..avail_len].copy_from_slice(__input);
9530            Bytes::new(&payload_buf)
9531        } else {
9532            Bytes::new(__input)
9533        };
9534        let mut __struct = Self::default();
9535        let tmp = buf.get_u16_le()?;
9536        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9537            ::mavlink_core::error::ParserError::InvalidEnum {
9538                enum_type: "MavCmd",
9539                value: tmp as u64,
9540            },
9541        )?;
9542        let tmp = buf.get_u8()?;
9543        __struct.result =
9544            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9545                enum_type: "MavResult",
9546                value: tmp as u64,
9547            })?;
9548        __struct.progress = buf.get_u8()?;
9549        __struct.result_param2 = buf.get_i32_le()?;
9550        __struct.target_system = buf.get_u8()?;
9551        __struct.target_component = buf.get_u8()?;
9552        Ok(__struct)
9553    }
9554    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9555        let mut __tmp = BytesMut::new(bytes);
9556        #[allow(clippy::absurd_extreme_comparisons)]
9557        #[allow(unused_comparisons)]
9558        if __tmp.remaining() < Self::ENCODED_LEN {
9559            panic!(
9560                "buffer is too small (need {} bytes, but got {})",
9561                Self::ENCODED_LEN,
9562                __tmp.remaining(),
9563            )
9564        }
9565        __tmp.put_u16_le(self.command as u16);
9566        __tmp.put_u8(self.result as u8);
9567        if matches!(version, MavlinkVersion::V2) {
9568            __tmp.put_u8(self.progress);
9569            __tmp.put_i32_le(self.result_param2);
9570            __tmp.put_u8(self.target_system);
9571            __tmp.put_u8(self.target_component);
9572            let len = __tmp.len();
9573            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9574        } else {
9575            __tmp.len()
9576        }
9577    }
9578}
9579#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9580#[doc = ""]
9581#[doc = "ID: 80"]
9582#[derive(Debug, Clone, PartialEq)]
9583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9585#[cfg_attr(feature = "ts", derive(TS))]
9586#[cfg_attr(feature = "ts", ts(export))]
9587pub struct COMMAND_CANCEL_DATA {
9588    #[doc = "Command ID (of command to cancel)."]
9589    pub command: MavCmd,
9590    #[doc = "System executing long running command. Should not be broadcast (0)."]
9591    pub target_system: u8,
9592    #[doc = "Component executing long running command."]
9593    pub target_component: u8,
9594}
9595impl COMMAND_CANCEL_DATA {
9596    pub const ENCODED_LEN: usize = 4usize;
9597    pub const DEFAULT: Self = Self {
9598        command: MavCmd::DEFAULT,
9599        target_system: 0_u8,
9600        target_component: 0_u8,
9601    };
9602    #[cfg(feature = "arbitrary")]
9603    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9604        use arbitrary::{Arbitrary, Unstructured};
9605        let mut buf = [0u8; 1024];
9606        rng.fill_bytes(&mut buf);
9607        let mut unstructured = Unstructured::new(&buf);
9608        Self::arbitrary(&mut unstructured).unwrap_or_default()
9609    }
9610}
9611impl Default for COMMAND_CANCEL_DATA {
9612    fn default() -> Self {
9613        Self::DEFAULT.clone()
9614    }
9615}
9616impl MessageData for COMMAND_CANCEL_DATA {
9617    type Message = MavMessage;
9618    const ID: u32 = 80u32;
9619    const NAME: &'static str = "COMMAND_CANCEL";
9620    const EXTRA_CRC: u8 = 14u8;
9621    const ENCODED_LEN: usize = 4usize;
9622    fn deser(
9623        _version: MavlinkVersion,
9624        __input: &[u8],
9625    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9626        let avail_len = __input.len();
9627        let mut payload_buf = [0; Self::ENCODED_LEN];
9628        let mut buf = if avail_len < Self::ENCODED_LEN {
9629            payload_buf[0..avail_len].copy_from_slice(__input);
9630            Bytes::new(&payload_buf)
9631        } else {
9632            Bytes::new(__input)
9633        };
9634        let mut __struct = Self::default();
9635        let tmp = buf.get_u16_le()?;
9636        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9637            ::mavlink_core::error::ParserError::InvalidEnum {
9638                enum_type: "MavCmd",
9639                value: tmp as u64,
9640            },
9641        )?;
9642        __struct.target_system = buf.get_u8()?;
9643        __struct.target_component = buf.get_u8()?;
9644        Ok(__struct)
9645    }
9646    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9647        let mut __tmp = BytesMut::new(bytes);
9648        #[allow(clippy::absurd_extreme_comparisons)]
9649        #[allow(unused_comparisons)]
9650        if __tmp.remaining() < Self::ENCODED_LEN {
9651            panic!(
9652                "buffer is too small (need {} bytes, but got {})",
9653                Self::ENCODED_LEN,
9654                __tmp.remaining(),
9655            )
9656        }
9657        __tmp.put_u16_le(self.command as u16);
9658        __tmp.put_u8(self.target_system);
9659        __tmp.put_u8(self.target_component);
9660        if matches!(version, MavlinkVersion::V2) {
9661            let len = __tmp.len();
9662            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9663        } else {
9664            __tmp.len()
9665        }
9666    }
9667}
9668#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9669#[doc = ""]
9670#[doc = "ID: 75"]
9671#[derive(Debug, Clone, PartialEq)]
9672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9674#[cfg_attr(feature = "ts", derive(TS))]
9675#[cfg_attr(feature = "ts", ts(export))]
9676pub struct COMMAND_INT_DATA {
9677    #[doc = "PARAM1, see MAV_CMD enum"]
9678    pub param1: f32,
9679    #[doc = "PARAM2, see MAV_CMD enum"]
9680    pub param2: f32,
9681    #[doc = "PARAM3, see MAV_CMD enum"]
9682    pub param3: f32,
9683    #[doc = "PARAM4, see MAV_CMD enum"]
9684    pub param4: f32,
9685    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9686    pub x: i32,
9687    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9688    pub y: i32,
9689    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9690    pub z: f32,
9691    #[doc = "The scheduled action for the mission item."]
9692    pub command: MavCmd,
9693    #[doc = "System ID"]
9694    pub target_system: u8,
9695    #[doc = "Component ID"]
9696    pub target_component: u8,
9697    #[doc = "The coordinate system of the COMMAND."]
9698    pub frame: MavFrame,
9699    #[doc = "Not used."]
9700    pub current: u8,
9701    #[doc = "Not used (set 0)."]
9702    pub autocontinue: u8,
9703}
9704impl COMMAND_INT_DATA {
9705    pub const ENCODED_LEN: usize = 35usize;
9706    pub const DEFAULT: Self = Self {
9707        param1: 0.0_f32,
9708        param2: 0.0_f32,
9709        param3: 0.0_f32,
9710        param4: 0.0_f32,
9711        x: 0_i32,
9712        y: 0_i32,
9713        z: 0.0_f32,
9714        command: MavCmd::DEFAULT,
9715        target_system: 0_u8,
9716        target_component: 0_u8,
9717        frame: MavFrame::DEFAULT,
9718        current: 0_u8,
9719        autocontinue: 0_u8,
9720    };
9721    #[cfg(feature = "arbitrary")]
9722    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9723        use arbitrary::{Arbitrary, Unstructured};
9724        let mut buf = [0u8; 1024];
9725        rng.fill_bytes(&mut buf);
9726        let mut unstructured = Unstructured::new(&buf);
9727        Self::arbitrary(&mut unstructured).unwrap_or_default()
9728    }
9729}
9730impl Default for COMMAND_INT_DATA {
9731    fn default() -> Self {
9732        Self::DEFAULT.clone()
9733    }
9734}
9735impl MessageData for COMMAND_INT_DATA {
9736    type Message = MavMessage;
9737    const ID: u32 = 75u32;
9738    const NAME: &'static str = "COMMAND_INT";
9739    const EXTRA_CRC: u8 = 158u8;
9740    const ENCODED_LEN: usize = 35usize;
9741    fn deser(
9742        _version: MavlinkVersion,
9743        __input: &[u8],
9744    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9745        let avail_len = __input.len();
9746        let mut payload_buf = [0; Self::ENCODED_LEN];
9747        let mut buf = if avail_len < Self::ENCODED_LEN {
9748            payload_buf[0..avail_len].copy_from_slice(__input);
9749            Bytes::new(&payload_buf)
9750        } else {
9751            Bytes::new(__input)
9752        };
9753        let mut __struct = Self::default();
9754        __struct.param1 = buf.get_f32_le()?;
9755        __struct.param2 = buf.get_f32_le()?;
9756        __struct.param3 = buf.get_f32_le()?;
9757        __struct.param4 = buf.get_f32_le()?;
9758        __struct.x = buf.get_i32_le()?;
9759        __struct.y = buf.get_i32_le()?;
9760        __struct.z = buf.get_f32_le()?;
9761        let tmp = buf.get_u16_le()?;
9762        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9763            ::mavlink_core::error::ParserError::InvalidEnum {
9764                enum_type: "MavCmd",
9765                value: tmp as u64,
9766            },
9767        )?;
9768        __struct.target_system = buf.get_u8()?;
9769        __struct.target_component = buf.get_u8()?;
9770        let tmp = buf.get_u8()?;
9771        __struct.frame =
9772            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9773                enum_type: "MavFrame",
9774                value: tmp as u64,
9775            })?;
9776        __struct.current = buf.get_u8()?;
9777        __struct.autocontinue = buf.get_u8()?;
9778        Ok(__struct)
9779    }
9780    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9781        let mut __tmp = BytesMut::new(bytes);
9782        #[allow(clippy::absurd_extreme_comparisons)]
9783        #[allow(unused_comparisons)]
9784        if __tmp.remaining() < Self::ENCODED_LEN {
9785            panic!(
9786                "buffer is too small (need {} bytes, but got {})",
9787                Self::ENCODED_LEN,
9788                __tmp.remaining(),
9789            )
9790        }
9791        __tmp.put_f32_le(self.param1);
9792        __tmp.put_f32_le(self.param2);
9793        __tmp.put_f32_le(self.param3);
9794        __tmp.put_f32_le(self.param4);
9795        __tmp.put_i32_le(self.x);
9796        __tmp.put_i32_le(self.y);
9797        __tmp.put_f32_le(self.z);
9798        __tmp.put_u16_le(self.command as u16);
9799        __tmp.put_u8(self.target_system);
9800        __tmp.put_u8(self.target_component);
9801        __tmp.put_u8(self.frame as u8);
9802        __tmp.put_u8(self.current);
9803        __tmp.put_u8(self.autocontinue);
9804        if matches!(version, MavlinkVersion::V2) {
9805            let len = __tmp.len();
9806            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9807        } else {
9808            __tmp.len()
9809        }
9810    }
9811}
9812#[doc = "Message encoding a command with parameters as scaled integers and additional metadata. Scaling depends on the actual command value."]
9813#[doc = ""]
9814#[doc = "ID: 223"]
9815#[derive(Debug, Clone, PartialEq)]
9816#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9817#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9818#[cfg_attr(feature = "ts", derive(TS))]
9819#[cfg_attr(feature = "ts", ts(export))]
9820pub struct COMMAND_INT_STAMPED_DATA {
9821    #[doc = "Microseconds elapsed since vehicle boot"]
9822    pub vehicle_timestamp: u64,
9823    #[doc = "UTC time, seconds elapsed since 01.01.1970"]
9824    pub utc_time: u32,
9825    #[doc = "PARAM1, see MAV_CMD enum"]
9826    pub param1: f32,
9827    #[doc = "PARAM2, see MAV_CMD enum"]
9828    pub param2: f32,
9829    #[doc = "PARAM3, see MAV_CMD enum"]
9830    pub param3: f32,
9831    #[doc = "PARAM4, see MAV_CMD enum"]
9832    pub param4: f32,
9833    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9834    pub x: i32,
9835    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9836    pub y: i32,
9837    #[doc = "PARAM7 / z position: global: altitude in meters (MSL, WGS84, AGL or relative to home - depending on frame)."]
9838    pub z: f32,
9839    #[doc = "The scheduled action for the mission item, as defined by MAV_CMD enum"]
9840    pub command: MavCmd,
9841    #[doc = "System ID"]
9842    pub target_system: u8,
9843    #[doc = "Component ID"]
9844    pub target_component: u8,
9845    #[doc = "The coordinate system of the COMMAND, as defined by MAV_FRAME enum"]
9846    pub frame: MavFrame,
9847    #[doc = "false:0, true:1"]
9848    pub current: u8,
9849    #[doc = "autocontinue to next wp"]
9850    pub autocontinue: u8,
9851}
9852impl COMMAND_INT_STAMPED_DATA {
9853    pub const ENCODED_LEN: usize = 47usize;
9854    pub const DEFAULT: Self = Self {
9855        vehicle_timestamp: 0_u64,
9856        utc_time: 0_u32,
9857        param1: 0.0_f32,
9858        param2: 0.0_f32,
9859        param3: 0.0_f32,
9860        param4: 0.0_f32,
9861        x: 0_i32,
9862        y: 0_i32,
9863        z: 0.0_f32,
9864        command: MavCmd::DEFAULT,
9865        target_system: 0_u8,
9866        target_component: 0_u8,
9867        frame: MavFrame::DEFAULT,
9868        current: 0_u8,
9869        autocontinue: 0_u8,
9870    };
9871    #[cfg(feature = "arbitrary")]
9872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9873        use arbitrary::{Arbitrary, Unstructured};
9874        let mut buf = [0u8; 1024];
9875        rng.fill_bytes(&mut buf);
9876        let mut unstructured = Unstructured::new(&buf);
9877        Self::arbitrary(&mut unstructured).unwrap_or_default()
9878    }
9879}
9880impl Default for COMMAND_INT_STAMPED_DATA {
9881    fn default() -> Self {
9882        Self::DEFAULT.clone()
9883    }
9884}
9885impl MessageData for COMMAND_INT_STAMPED_DATA {
9886    type Message = MavMessage;
9887    const ID: u32 = 223u32;
9888    const NAME: &'static str = "COMMAND_INT_STAMPED";
9889    const EXTRA_CRC: u8 = 119u8;
9890    const ENCODED_LEN: usize = 47usize;
9891    fn deser(
9892        _version: MavlinkVersion,
9893        __input: &[u8],
9894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9895        let avail_len = __input.len();
9896        let mut payload_buf = [0; Self::ENCODED_LEN];
9897        let mut buf = if avail_len < Self::ENCODED_LEN {
9898            payload_buf[0..avail_len].copy_from_slice(__input);
9899            Bytes::new(&payload_buf)
9900        } else {
9901            Bytes::new(__input)
9902        };
9903        let mut __struct = Self::default();
9904        __struct.vehicle_timestamp = buf.get_u64_le()?;
9905        __struct.utc_time = buf.get_u32_le()?;
9906        __struct.param1 = buf.get_f32_le()?;
9907        __struct.param2 = buf.get_f32_le()?;
9908        __struct.param3 = buf.get_f32_le()?;
9909        __struct.param4 = buf.get_f32_le()?;
9910        __struct.x = buf.get_i32_le()?;
9911        __struct.y = buf.get_i32_le()?;
9912        __struct.z = buf.get_f32_le()?;
9913        let tmp = buf.get_u16_le()?;
9914        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9915            ::mavlink_core::error::ParserError::InvalidEnum {
9916                enum_type: "MavCmd",
9917                value: tmp as u64,
9918            },
9919        )?;
9920        __struct.target_system = buf.get_u8()?;
9921        __struct.target_component = buf.get_u8()?;
9922        let tmp = buf.get_u8()?;
9923        __struct.frame =
9924            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9925                enum_type: "MavFrame",
9926                value: tmp as u64,
9927            })?;
9928        __struct.current = buf.get_u8()?;
9929        __struct.autocontinue = buf.get_u8()?;
9930        Ok(__struct)
9931    }
9932    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9933        let mut __tmp = BytesMut::new(bytes);
9934        #[allow(clippy::absurd_extreme_comparisons)]
9935        #[allow(unused_comparisons)]
9936        if __tmp.remaining() < Self::ENCODED_LEN {
9937            panic!(
9938                "buffer is too small (need {} bytes, but got {})",
9939                Self::ENCODED_LEN,
9940                __tmp.remaining(),
9941            )
9942        }
9943        __tmp.put_u64_le(self.vehicle_timestamp);
9944        __tmp.put_u32_le(self.utc_time);
9945        __tmp.put_f32_le(self.param1);
9946        __tmp.put_f32_le(self.param2);
9947        __tmp.put_f32_le(self.param3);
9948        __tmp.put_f32_le(self.param4);
9949        __tmp.put_i32_le(self.x);
9950        __tmp.put_i32_le(self.y);
9951        __tmp.put_f32_le(self.z);
9952        __tmp.put_u16_le(self.command as u16);
9953        __tmp.put_u8(self.target_system);
9954        __tmp.put_u8(self.target_component);
9955        __tmp.put_u8(self.frame as u8);
9956        __tmp.put_u8(self.current);
9957        __tmp.put_u8(self.autocontinue);
9958        if matches!(version, MavlinkVersion::V2) {
9959            let len = __tmp.len();
9960            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9961        } else {
9962            __tmp.len()
9963        }
9964    }
9965}
9966#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9967#[doc = ""]
9968#[doc = "ID: 76"]
9969#[derive(Debug, Clone, PartialEq)]
9970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9972#[cfg_attr(feature = "ts", derive(TS))]
9973#[cfg_attr(feature = "ts", ts(export))]
9974pub struct COMMAND_LONG_DATA {
9975    #[doc = "Parameter 1 (for the specific command)."]
9976    pub param1: f32,
9977    #[doc = "Parameter 2 (for the specific command)."]
9978    pub param2: f32,
9979    #[doc = "Parameter 3 (for the specific command)."]
9980    pub param3: f32,
9981    #[doc = "Parameter 4 (for the specific command)."]
9982    pub param4: f32,
9983    #[doc = "Parameter 5 (for the specific command)."]
9984    pub param5: f32,
9985    #[doc = "Parameter 6 (for the specific command)."]
9986    pub param6: f32,
9987    #[doc = "Parameter 7 (for the specific command)."]
9988    pub param7: f32,
9989    #[doc = "Command ID (of command to send)."]
9990    pub command: MavCmd,
9991    #[doc = "System which should execute the command"]
9992    pub target_system: u8,
9993    #[doc = "Component which should execute the command, 0 for all components"]
9994    pub target_component: u8,
9995    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9996    pub confirmation: u8,
9997}
9998impl COMMAND_LONG_DATA {
9999    pub const ENCODED_LEN: usize = 33usize;
10000    pub const DEFAULT: Self = Self {
10001        param1: 0.0_f32,
10002        param2: 0.0_f32,
10003        param3: 0.0_f32,
10004        param4: 0.0_f32,
10005        param5: 0.0_f32,
10006        param6: 0.0_f32,
10007        param7: 0.0_f32,
10008        command: MavCmd::DEFAULT,
10009        target_system: 0_u8,
10010        target_component: 0_u8,
10011        confirmation: 0_u8,
10012    };
10013    #[cfg(feature = "arbitrary")]
10014    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10015        use arbitrary::{Arbitrary, Unstructured};
10016        let mut buf = [0u8; 1024];
10017        rng.fill_bytes(&mut buf);
10018        let mut unstructured = Unstructured::new(&buf);
10019        Self::arbitrary(&mut unstructured).unwrap_or_default()
10020    }
10021}
10022impl Default for COMMAND_LONG_DATA {
10023    fn default() -> Self {
10024        Self::DEFAULT.clone()
10025    }
10026}
10027impl MessageData for COMMAND_LONG_DATA {
10028    type Message = MavMessage;
10029    const ID: u32 = 76u32;
10030    const NAME: &'static str = "COMMAND_LONG";
10031    const EXTRA_CRC: u8 = 152u8;
10032    const ENCODED_LEN: usize = 33usize;
10033    fn deser(
10034        _version: MavlinkVersion,
10035        __input: &[u8],
10036    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10037        let avail_len = __input.len();
10038        let mut payload_buf = [0; Self::ENCODED_LEN];
10039        let mut buf = if avail_len < Self::ENCODED_LEN {
10040            payload_buf[0..avail_len].copy_from_slice(__input);
10041            Bytes::new(&payload_buf)
10042        } else {
10043            Bytes::new(__input)
10044        };
10045        let mut __struct = Self::default();
10046        __struct.param1 = buf.get_f32_le()?;
10047        __struct.param2 = buf.get_f32_le()?;
10048        __struct.param3 = buf.get_f32_le()?;
10049        __struct.param4 = buf.get_f32_le()?;
10050        __struct.param5 = buf.get_f32_le()?;
10051        __struct.param6 = buf.get_f32_le()?;
10052        __struct.param7 = buf.get_f32_le()?;
10053        let tmp = buf.get_u16_le()?;
10054        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
10055            ::mavlink_core::error::ParserError::InvalidEnum {
10056                enum_type: "MavCmd",
10057                value: tmp as u64,
10058            },
10059        )?;
10060        __struct.target_system = buf.get_u8()?;
10061        __struct.target_component = buf.get_u8()?;
10062        __struct.confirmation = buf.get_u8()?;
10063        Ok(__struct)
10064    }
10065    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10066        let mut __tmp = BytesMut::new(bytes);
10067        #[allow(clippy::absurd_extreme_comparisons)]
10068        #[allow(unused_comparisons)]
10069        if __tmp.remaining() < Self::ENCODED_LEN {
10070            panic!(
10071                "buffer is too small (need {} bytes, but got {})",
10072                Self::ENCODED_LEN,
10073                __tmp.remaining(),
10074            )
10075        }
10076        __tmp.put_f32_le(self.param1);
10077        __tmp.put_f32_le(self.param2);
10078        __tmp.put_f32_le(self.param3);
10079        __tmp.put_f32_le(self.param4);
10080        __tmp.put_f32_le(self.param5);
10081        __tmp.put_f32_le(self.param6);
10082        __tmp.put_f32_le(self.param7);
10083        __tmp.put_u16_le(self.command as u16);
10084        __tmp.put_u8(self.target_system);
10085        __tmp.put_u8(self.target_component);
10086        __tmp.put_u8(self.confirmation);
10087        if matches!(version, MavlinkVersion::V2) {
10088            let len = __tmp.len();
10089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10090        } else {
10091            __tmp.len()
10092        }
10093    }
10094}
10095#[doc = "Send a command with up to seven parameters to the MAV and additional metadata."]
10096#[doc = ""]
10097#[doc = "ID: 224"]
10098#[derive(Debug, Clone, PartialEq)]
10099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10101#[cfg_attr(feature = "ts", derive(TS))]
10102#[cfg_attr(feature = "ts", ts(export))]
10103pub struct COMMAND_LONG_STAMPED_DATA {
10104    #[doc = "Microseconds elapsed since vehicle boot"]
10105    pub vehicle_timestamp: u64,
10106    #[doc = "UTC time, seconds elapsed since 01.01.1970"]
10107    pub utc_time: u32,
10108    #[doc = "Parameter 1, as defined by MAV_CMD enum."]
10109    pub param1: f32,
10110    #[doc = "Parameter 2, as defined by MAV_CMD enum."]
10111    pub param2: f32,
10112    #[doc = "Parameter 3, as defined by MAV_CMD enum."]
10113    pub param3: f32,
10114    #[doc = "Parameter 4, as defined by MAV_CMD enum."]
10115    pub param4: f32,
10116    #[doc = "Parameter 5, as defined by MAV_CMD enum."]
10117    pub param5: f32,
10118    #[doc = "Parameter 6, as defined by MAV_CMD enum."]
10119    pub param6: f32,
10120    #[doc = "Parameter 7, as defined by MAV_CMD enum."]
10121    pub param7: f32,
10122    #[doc = "Command ID, as defined by MAV_CMD enum."]
10123    pub command: MavCmd,
10124    #[doc = "System which should execute the command"]
10125    pub target_system: u8,
10126    #[doc = "Component which should execute the command, 0 for all components"]
10127    pub target_component: u8,
10128    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
10129    pub confirmation: u8,
10130}
10131impl COMMAND_LONG_STAMPED_DATA {
10132    pub const ENCODED_LEN: usize = 45usize;
10133    pub const DEFAULT: Self = Self {
10134        vehicle_timestamp: 0_u64,
10135        utc_time: 0_u32,
10136        param1: 0.0_f32,
10137        param2: 0.0_f32,
10138        param3: 0.0_f32,
10139        param4: 0.0_f32,
10140        param5: 0.0_f32,
10141        param6: 0.0_f32,
10142        param7: 0.0_f32,
10143        command: MavCmd::DEFAULT,
10144        target_system: 0_u8,
10145        target_component: 0_u8,
10146        confirmation: 0_u8,
10147    };
10148    #[cfg(feature = "arbitrary")]
10149    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10150        use arbitrary::{Arbitrary, Unstructured};
10151        let mut buf = [0u8; 1024];
10152        rng.fill_bytes(&mut buf);
10153        let mut unstructured = Unstructured::new(&buf);
10154        Self::arbitrary(&mut unstructured).unwrap_or_default()
10155    }
10156}
10157impl Default for COMMAND_LONG_STAMPED_DATA {
10158    fn default() -> Self {
10159        Self::DEFAULT.clone()
10160    }
10161}
10162impl MessageData for COMMAND_LONG_STAMPED_DATA {
10163    type Message = MavMessage;
10164    const ID: u32 = 224u32;
10165    const NAME: &'static str = "COMMAND_LONG_STAMPED";
10166    const EXTRA_CRC: u8 = 102u8;
10167    const ENCODED_LEN: usize = 45usize;
10168    fn deser(
10169        _version: MavlinkVersion,
10170        __input: &[u8],
10171    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10172        let avail_len = __input.len();
10173        let mut payload_buf = [0; Self::ENCODED_LEN];
10174        let mut buf = if avail_len < Self::ENCODED_LEN {
10175            payload_buf[0..avail_len].copy_from_slice(__input);
10176            Bytes::new(&payload_buf)
10177        } else {
10178            Bytes::new(__input)
10179        };
10180        let mut __struct = Self::default();
10181        __struct.vehicle_timestamp = buf.get_u64_le()?;
10182        __struct.utc_time = buf.get_u32_le()?;
10183        __struct.param1 = buf.get_f32_le()?;
10184        __struct.param2 = buf.get_f32_le()?;
10185        __struct.param3 = buf.get_f32_le()?;
10186        __struct.param4 = buf.get_f32_le()?;
10187        __struct.param5 = buf.get_f32_le()?;
10188        __struct.param6 = buf.get_f32_le()?;
10189        __struct.param7 = buf.get_f32_le()?;
10190        let tmp = buf.get_u16_le()?;
10191        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
10192            ::mavlink_core::error::ParserError::InvalidEnum {
10193                enum_type: "MavCmd",
10194                value: tmp as u64,
10195            },
10196        )?;
10197        __struct.target_system = buf.get_u8()?;
10198        __struct.target_component = buf.get_u8()?;
10199        __struct.confirmation = buf.get_u8()?;
10200        Ok(__struct)
10201    }
10202    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10203        let mut __tmp = BytesMut::new(bytes);
10204        #[allow(clippy::absurd_extreme_comparisons)]
10205        #[allow(unused_comparisons)]
10206        if __tmp.remaining() < Self::ENCODED_LEN {
10207            panic!(
10208                "buffer is too small (need {} bytes, but got {})",
10209                Self::ENCODED_LEN,
10210                __tmp.remaining(),
10211            )
10212        }
10213        __tmp.put_u64_le(self.vehicle_timestamp);
10214        __tmp.put_u32_le(self.utc_time);
10215        __tmp.put_f32_le(self.param1);
10216        __tmp.put_f32_le(self.param2);
10217        __tmp.put_f32_le(self.param3);
10218        __tmp.put_f32_le(self.param4);
10219        __tmp.put_f32_le(self.param5);
10220        __tmp.put_f32_le(self.param6);
10221        __tmp.put_f32_le(self.param7);
10222        __tmp.put_u16_le(self.command as u16);
10223        __tmp.put_u8(self.target_system);
10224        __tmp.put_u8(self.target_component);
10225        __tmp.put_u8(self.confirmation);
10226        if matches!(version, MavlinkVersion::V2) {
10227            let len = __tmp.len();
10228            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10229        } else {
10230            __tmp.len()
10231        }
10232    }
10233}
10234#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
10235#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
10236#[doc = ""]
10237#[doc = "ID: 395"]
10238#[derive(Debug, Clone, PartialEq)]
10239#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10240#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10241#[cfg_attr(feature = "ts", derive(TS))]
10242#[cfg_attr(feature = "ts", ts(export))]
10243pub struct COMPONENT_INFORMATION_DATA {
10244    #[doc = "Timestamp (time since system boot)."]
10245    pub time_boot_ms: u32,
10246    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
10247    pub general_metadata_file_crc: u32,
10248    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
10249    pub peripherals_metadata_file_crc: u32,
10250    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10251    #[cfg_attr(feature = "ts", ts(type = "string"))]
10252    pub general_metadata_uri: CharArray<100>,
10253    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
10254    #[cfg_attr(feature = "ts", ts(type = "string"))]
10255    pub peripherals_metadata_uri: CharArray<100>,
10256}
10257impl COMPONENT_INFORMATION_DATA {
10258    pub const ENCODED_LEN: usize = 212usize;
10259    pub const DEFAULT: Self = Self {
10260        time_boot_ms: 0_u32,
10261        general_metadata_file_crc: 0_u32,
10262        peripherals_metadata_file_crc: 0_u32,
10263        general_metadata_uri: CharArray::new([0_u8; 100usize]),
10264        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
10265    };
10266    #[cfg(feature = "arbitrary")]
10267    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10268        use arbitrary::{Arbitrary, Unstructured};
10269        let mut buf = [0u8; 1024];
10270        rng.fill_bytes(&mut buf);
10271        let mut unstructured = Unstructured::new(&buf);
10272        Self::arbitrary(&mut unstructured).unwrap_or_default()
10273    }
10274}
10275impl Default for COMPONENT_INFORMATION_DATA {
10276    fn default() -> Self {
10277        Self::DEFAULT.clone()
10278    }
10279}
10280impl MessageData for COMPONENT_INFORMATION_DATA {
10281    type Message = MavMessage;
10282    const ID: u32 = 395u32;
10283    const NAME: &'static str = "COMPONENT_INFORMATION";
10284    const EXTRA_CRC: u8 = 0u8;
10285    const ENCODED_LEN: usize = 212usize;
10286    fn deser(
10287        _version: MavlinkVersion,
10288        __input: &[u8],
10289    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10290        let avail_len = __input.len();
10291        let mut payload_buf = [0; Self::ENCODED_LEN];
10292        let mut buf = if avail_len < Self::ENCODED_LEN {
10293            payload_buf[0..avail_len].copy_from_slice(__input);
10294            Bytes::new(&payload_buf)
10295        } else {
10296            Bytes::new(__input)
10297        };
10298        let mut __struct = Self::default();
10299        __struct.time_boot_ms = buf.get_u32_le()?;
10300        __struct.general_metadata_file_crc = buf.get_u32_le()?;
10301        __struct.peripherals_metadata_file_crc = buf.get_u32_le()?;
10302        let mut tmp = [0_u8; 100usize];
10303        for v in &mut tmp {
10304            *v = buf.get_u8()?;
10305        }
10306        __struct.general_metadata_uri = CharArray::new(tmp);
10307        let mut tmp = [0_u8; 100usize];
10308        for v in &mut tmp {
10309            *v = buf.get_u8()?;
10310        }
10311        __struct.peripherals_metadata_uri = CharArray::new(tmp);
10312        Ok(__struct)
10313    }
10314    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10315        let mut __tmp = BytesMut::new(bytes);
10316        #[allow(clippy::absurd_extreme_comparisons)]
10317        #[allow(unused_comparisons)]
10318        if __tmp.remaining() < Self::ENCODED_LEN {
10319            panic!(
10320                "buffer is too small (need {} bytes, but got {})",
10321                Self::ENCODED_LEN,
10322                __tmp.remaining(),
10323            )
10324        }
10325        __tmp.put_u32_le(self.time_boot_ms);
10326        __tmp.put_u32_le(self.general_metadata_file_crc);
10327        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
10328        for val in &self.general_metadata_uri {
10329            __tmp.put_u8(*val);
10330        }
10331        for val in &self.peripherals_metadata_uri {
10332            __tmp.put_u8(*val);
10333        }
10334        if matches!(version, MavlinkVersion::V2) {
10335            let len = __tmp.len();
10336            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10337        } else {
10338            __tmp.len()
10339        }
10340    }
10341}
10342#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
10343#[doc = ""]
10344#[doc = "ID: 396"]
10345#[derive(Debug, Clone, PartialEq)]
10346#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10347#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10348#[cfg_attr(feature = "ts", derive(TS))]
10349#[cfg_attr(feature = "ts", ts(export))]
10350pub struct COMPONENT_INFORMATION_BASIC_DATA {
10351    #[doc = "Component capability flags"]
10352    pub capabilities: MavProtocolCapability,
10353    #[doc = "Timestamp (time since system boot)."]
10354    pub time_boot_ms: u32,
10355    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
10356    pub time_manufacture_s: u32,
10357    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10358    #[cfg_attr(feature = "ts", ts(type = "string"))]
10359    pub vendor_name: CharArray<32>,
10360    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10361    #[cfg_attr(feature = "ts", ts(type = "string"))]
10362    pub model_name: CharArray<32>,
10363    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10364    #[cfg_attr(feature = "ts", ts(type = "string"))]
10365    pub software_version: CharArray<24>,
10366    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10367    #[cfg_attr(feature = "ts", ts(type = "string"))]
10368    pub hardware_version: CharArray<24>,
10369    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10370    #[cfg_attr(feature = "ts", ts(type = "string"))]
10371    pub serial_number: CharArray<32>,
10372}
10373impl COMPONENT_INFORMATION_BASIC_DATA {
10374    pub const ENCODED_LEN: usize = 160usize;
10375    pub const DEFAULT: Self = Self {
10376        capabilities: MavProtocolCapability::DEFAULT,
10377        time_boot_ms: 0_u32,
10378        time_manufacture_s: 0_u32,
10379        vendor_name: CharArray::new([0_u8; 32usize]),
10380        model_name: CharArray::new([0_u8; 32usize]),
10381        software_version: CharArray::new([0_u8; 24usize]),
10382        hardware_version: CharArray::new([0_u8; 24usize]),
10383        serial_number: CharArray::new([0_u8; 32usize]),
10384    };
10385    #[cfg(feature = "arbitrary")]
10386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10387        use arbitrary::{Arbitrary, Unstructured};
10388        let mut buf = [0u8; 1024];
10389        rng.fill_bytes(&mut buf);
10390        let mut unstructured = Unstructured::new(&buf);
10391        Self::arbitrary(&mut unstructured).unwrap_or_default()
10392    }
10393}
10394impl Default for COMPONENT_INFORMATION_BASIC_DATA {
10395    fn default() -> Self {
10396        Self::DEFAULT.clone()
10397    }
10398}
10399impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
10400    type Message = MavMessage;
10401    const ID: u32 = 396u32;
10402    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
10403    const EXTRA_CRC: u8 = 50u8;
10404    const ENCODED_LEN: usize = 160usize;
10405    fn deser(
10406        _version: MavlinkVersion,
10407        __input: &[u8],
10408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10409        let avail_len = __input.len();
10410        let mut payload_buf = [0; Self::ENCODED_LEN];
10411        let mut buf = if avail_len < Self::ENCODED_LEN {
10412            payload_buf[0..avail_len].copy_from_slice(__input);
10413            Bytes::new(&payload_buf)
10414        } else {
10415            Bytes::new(__input)
10416        };
10417        let mut __struct = Self::default();
10418        let tmp = buf.get_u64_le()?;
10419        __struct.capabilities = MavProtocolCapability::from_bits(
10420            tmp as <MavProtocolCapability as Flags>::Bits,
10421        )
10422        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10423            flag_type: "MavProtocolCapability",
10424            value: tmp as u64,
10425        })?;
10426        __struct.time_boot_ms = buf.get_u32_le()?;
10427        __struct.time_manufacture_s = buf.get_u32_le()?;
10428        let mut tmp = [0_u8; 32usize];
10429        for v in &mut tmp {
10430            *v = buf.get_u8()?;
10431        }
10432        __struct.vendor_name = CharArray::new(tmp);
10433        let mut tmp = [0_u8; 32usize];
10434        for v in &mut tmp {
10435            *v = buf.get_u8()?;
10436        }
10437        __struct.model_name = CharArray::new(tmp);
10438        let mut tmp = [0_u8; 24usize];
10439        for v in &mut tmp {
10440            *v = buf.get_u8()?;
10441        }
10442        __struct.software_version = CharArray::new(tmp);
10443        let mut tmp = [0_u8; 24usize];
10444        for v in &mut tmp {
10445            *v = buf.get_u8()?;
10446        }
10447        __struct.hardware_version = CharArray::new(tmp);
10448        let mut tmp = [0_u8; 32usize];
10449        for v in &mut tmp {
10450            *v = buf.get_u8()?;
10451        }
10452        __struct.serial_number = CharArray::new(tmp);
10453        Ok(__struct)
10454    }
10455    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10456        let mut __tmp = BytesMut::new(bytes);
10457        #[allow(clippy::absurd_extreme_comparisons)]
10458        #[allow(unused_comparisons)]
10459        if __tmp.remaining() < Self::ENCODED_LEN {
10460            panic!(
10461                "buffer is too small (need {} bytes, but got {})",
10462                Self::ENCODED_LEN,
10463                __tmp.remaining(),
10464            )
10465        }
10466        __tmp.put_u64_le(self.capabilities.bits() as u64);
10467        __tmp.put_u32_le(self.time_boot_ms);
10468        __tmp.put_u32_le(self.time_manufacture_s);
10469        for val in &self.vendor_name {
10470            __tmp.put_u8(*val);
10471        }
10472        for val in &self.model_name {
10473            __tmp.put_u8(*val);
10474        }
10475        for val in &self.software_version {
10476            __tmp.put_u8(*val);
10477        }
10478        for val in &self.hardware_version {
10479            __tmp.put_u8(*val);
10480        }
10481        for val in &self.serial_number {
10482            __tmp.put_u8(*val);
10483        }
10484        if matches!(version, MavlinkVersion::V2) {
10485            let len = __tmp.len();
10486            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10487        } else {
10488            __tmp.len()
10489        }
10490    }
10491}
10492#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
10493#[doc = ""]
10494#[doc = "ID: 397"]
10495#[derive(Debug, Clone, PartialEq)]
10496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10498#[cfg_attr(feature = "ts", derive(TS))]
10499#[cfg_attr(feature = "ts", ts(export))]
10500pub struct COMPONENT_METADATA_DATA {
10501    #[doc = "Timestamp (time since system boot)."]
10502    pub time_boot_ms: u32,
10503    #[doc = "CRC32 of the general metadata file."]
10504    pub file_crc: u32,
10505    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10506    #[cfg_attr(feature = "ts", ts(type = "string"))]
10507    pub uri: CharArray<100>,
10508}
10509impl COMPONENT_METADATA_DATA {
10510    pub const ENCODED_LEN: usize = 108usize;
10511    pub const DEFAULT: Self = Self {
10512        time_boot_ms: 0_u32,
10513        file_crc: 0_u32,
10514        uri: CharArray::new([0_u8; 100usize]),
10515    };
10516    #[cfg(feature = "arbitrary")]
10517    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10518        use arbitrary::{Arbitrary, Unstructured};
10519        let mut buf = [0u8; 1024];
10520        rng.fill_bytes(&mut buf);
10521        let mut unstructured = Unstructured::new(&buf);
10522        Self::arbitrary(&mut unstructured).unwrap_or_default()
10523    }
10524}
10525impl Default for COMPONENT_METADATA_DATA {
10526    fn default() -> Self {
10527        Self::DEFAULT.clone()
10528    }
10529}
10530impl MessageData for COMPONENT_METADATA_DATA {
10531    type Message = MavMessage;
10532    const ID: u32 = 397u32;
10533    const NAME: &'static str = "COMPONENT_METADATA";
10534    const EXTRA_CRC: u8 = 182u8;
10535    const ENCODED_LEN: usize = 108usize;
10536    fn deser(
10537        _version: MavlinkVersion,
10538        __input: &[u8],
10539    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10540        let avail_len = __input.len();
10541        let mut payload_buf = [0; Self::ENCODED_LEN];
10542        let mut buf = if avail_len < Self::ENCODED_LEN {
10543            payload_buf[0..avail_len].copy_from_slice(__input);
10544            Bytes::new(&payload_buf)
10545        } else {
10546            Bytes::new(__input)
10547        };
10548        let mut __struct = Self::default();
10549        __struct.time_boot_ms = buf.get_u32_le()?;
10550        __struct.file_crc = buf.get_u32_le()?;
10551        let mut tmp = [0_u8; 100usize];
10552        for v in &mut tmp {
10553            *v = buf.get_u8()?;
10554        }
10555        __struct.uri = CharArray::new(tmp);
10556        Ok(__struct)
10557    }
10558    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10559        let mut __tmp = BytesMut::new(bytes);
10560        #[allow(clippy::absurd_extreme_comparisons)]
10561        #[allow(unused_comparisons)]
10562        if __tmp.remaining() < Self::ENCODED_LEN {
10563            panic!(
10564                "buffer is too small (need {} bytes, but got {})",
10565                Self::ENCODED_LEN,
10566                __tmp.remaining(),
10567            )
10568        }
10569        __tmp.put_u32_le(self.time_boot_ms);
10570        __tmp.put_u32_le(self.file_crc);
10571        for val in &self.uri {
10572            __tmp.put_u8(*val);
10573        }
10574        if matches!(version, MavlinkVersion::V2) {
10575            let len = __tmp.len();
10576            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10577        } else {
10578            __tmp.len()
10579        }
10580    }
10581}
10582#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
10583#[doc = ""]
10584#[doc = "ID: 146"]
10585#[derive(Debug, Clone, PartialEq)]
10586#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10587#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10588#[cfg_attr(feature = "ts", derive(TS))]
10589#[cfg_attr(feature = "ts", ts(export))]
10590pub struct CONTROL_SYSTEM_STATE_DATA {
10591    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10592    pub time_usec: u64,
10593    #[doc = "X acceleration in body frame"]
10594    pub x_acc: f32,
10595    #[doc = "Y acceleration in body frame"]
10596    pub y_acc: f32,
10597    #[doc = "Z acceleration in body frame"]
10598    pub z_acc: f32,
10599    #[doc = "X velocity in body frame"]
10600    pub x_vel: f32,
10601    #[doc = "Y velocity in body frame"]
10602    pub y_vel: f32,
10603    #[doc = "Z velocity in body frame"]
10604    pub z_vel: f32,
10605    #[doc = "X position in local frame"]
10606    pub x_pos: f32,
10607    #[doc = "Y position in local frame"]
10608    pub y_pos: f32,
10609    #[doc = "Z position in local frame"]
10610    pub z_pos: f32,
10611    #[doc = "Airspeed, set to -1 if unknown"]
10612    pub airspeed: f32,
10613    #[doc = "Variance of body velocity estimate"]
10614    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10615    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10616    pub vel_variance: [f32; 3],
10617    #[doc = "Variance in local position"]
10618    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10619    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10620    pub pos_variance: [f32; 3],
10621    #[doc = "The attitude, represented as Quaternion"]
10622    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10623    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10624    pub q: [f32; 4],
10625    #[doc = "Angular rate in roll axis"]
10626    pub roll_rate: f32,
10627    #[doc = "Angular rate in pitch axis"]
10628    pub pitch_rate: f32,
10629    #[doc = "Angular rate in yaw axis"]
10630    pub yaw_rate: f32,
10631}
10632impl CONTROL_SYSTEM_STATE_DATA {
10633    pub const ENCODED_LEN: usize = 100usize;
10634    pub const DEFAULT: Self = Self {
10635        time_usec: 0_u64,
10636        x_acc: 0.0_f32,
10637        y_acc: 0.0_f32,
10638        z_acc: 0.0_f32,
10639        x_vel: 0.0_f32,
10640        y_vel: 0.0_f32,
10641        z_vel: 0.0_f32,
10642        x_pos: 0.0_f32,
10643        y_pos: 0.0_f32,
10644        z_pos: 0.0_f32,
10645        airspeed: 0.0_f32,
10646        vel_variance: [0.0_f32; 3usize],
10647        pos_variance: [0.0_f32; 3usize],
10648        q: [0.0_f32; 4usize],
10649        roll_rate: 0.0_f32,
10650        pitch_rate: 0.0_f32,
10651        yaw_rate: 0.0_f32,
10652    };
10653    #[cfg(feature = "arbitrary")]
10654    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10655        use arbitrary::{Arbitrary, Unstructured};
10656        let mut buf = [0u8; 1024];
10657        rng.fill_bytes(&mut buf);
10658        let mut unstructured = Unstructured::new(&buf);
10659        Self::arbitrary(&mut unstructured).unwrap_or_default()
10660    }
10661}
10662impl Default for CONTROL_SYSTEM_STATE_DATA {
10663    fn default() -> Self {
10664        Self::DEFAULT.clone()
10665    }
10666}
10667impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10668    type Message = MavMessage;
10669    const ID: u32 = 146u32;
10670    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10671    const EXTRA_CRC: u8 = 103u8;
10672    const ENCODED_LEN: usize = 100usize;
10673    fn deser(
10674        _version: MavlinkVersion,
10675        __input: &[u8],
10676    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10677        let avail_len = __input.len();
10678        let mut payload_buf = [0; Self::ENCODED_LEN];
10679        let mut buf = if avail_len < Self::ENCODED_LEN {
10680            payload_buf[0..avail_len].copy_from_slice(__input);
10681            Bytes::new(&payload_buf)
10682        } else {
10683            Bytes::new(__input)
10684        };
10685        let mut __struct = Self::default();
10686        __struct.time_usec = buf.get_u64_le()?;
10687        __struct.x_acc = buf.get_f32_le()?;
10688        __struct.y_acc = buf.get_f32_le()?;
10689        __struct.z_acc = buf.get_f32_le()?;
10690        __struct.x_vel = buf.get_f32_le()?;
10691        __struct.y_vel = buf.get_f32_le()?;
10692        __struct.z_vel = buf.get_f32_le()?;
10693        __struct.x_pos = buf.get_f32_le()?;
10694        __struct.y_pos = buf.get_f32_le()?;
10695        __struct.z_pos = buf.get_f32_le()?;
10696        __struct.airspeed = buf.get_f32_le()?;
10697        for v in &mut __struct.vel_variance {
10698            let val = buf.get_f32_le()?;
10699            *v = val;
10700        }
10701        for v in &mut __struct.pos_variance {
10702            let val = buf.get_f32_le()?;
10703            *v = val;
10704        }
10705        for v in &mut __struct.q {
10706            let val = buf.get_f32_le()?;
10707            *v = val;
10708        }
10709        __struct.roll_rate = buf.get_f32_le()?;
10710        __struct.pitch_rate = buf.get_f32_le()?;
10711        __struct.yaw_rate = buf.get_f32_le()?;
10712        Ok(__struct)
10713    }
10714    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10715        let mut __tmp = BytesMut::new(bytes);
10716        #[allow(clippy::absurd_extreme_comparisons)]
10717        #[allow(unused_comparisons)]
10718        if __tmp.remaining() < Self::ENCODED_LEN {
10719            panic!(
10720                "buffer is too small (need {} bytes, but got {})",
10721                Self::ENCODED_LEN,
10722                __tmp.remaining(),
10723            )
10724        }
10725        __tmp.put_u64_le(self.time_usec);
10726        __tmp.put_f32_le(self.x_acc);
10727        __tmp.put_f32_le(self.y_acc);
10728        __tmp.put_f32_le(self.z_acc);
10729        __tmp.put_f32_le(self.x_vel);
10730        __tmp.put_f32_le(self.y_vel);
10731        __tmp.put_f32_le(self.z_vel);
10732        __tmp.put_f32_le(self.x_pos);
10733        __tmp.put_f32_le(self.y_pos);
10734        __tmp.put_f32_le(self.z_pos);
10735        __tmp.put_f32_le(self.airspeed);
10736        for val in &self.vel_variance {
10737            __tmp.put_f32_le(*val);
10738        }
10739        for val in &self.pos_variance {
10740            __tmp.put_f32_le(*val);
10741        }
10742        for val in &self.q {
10743            __tmp.put_f32_le(*val);
10744        }
10745        __tmp.put_f32_le(self.roll_rate);
10746        __tmp.put_f32_le(self.pitch_rate);
10747        __tmp.put_f32_le(self.yaw_rate);
10748        if matches!(version, MavlinkVersion::V2) {
10749            let len = __tmp.len();
10750            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10751        } else {
10752            __tmp.len()
10753        }
10754    }
10755}
10756#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10757#[doc = ""]
10758#[doc = "ID: 411"]
10759#[derive(Debug, Clone, PartialEq)]
10760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10762#[cfg_attr(feature = "ts", derive(TS))]
10763#[cfg_attr(feature = "ts", ts(export))]
10764pub struct CURRENT_EVENT_SEQUENCE_DATA {
10765    #[doc = "Sequence number."]
10766    pub sequence: u16,
10767    #[doc = "Flag bitset."]
10768    pub flags: MavEventCurrentSequenceFlags,
10769}
10770impl CURRENT_EVENT_SEQUENCE_DATA {
10771    pub const ENCODED_LEN: usize = 3usize;
10772    pub const DEFAULT: Self = Self {
10773        sequence: 0_u16,
10774        flags: MavEventCurrentSequenceFlags::DEFAULT,
10775    };
10776    #[cfg(feature = "arbitrary")]
10777    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10778        use arbitrary::{Arbitrary, Unstructured};
10779        let mut buf = [0u8; 1024];
10780        rng.fill_bytes(&mut buf);
10781        let mut unstructured = Unstructured::new(&buf);
10782        Self::arbitrary(&mut unstructured).unwrap_or_default()
10783    }
10784}
10785impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10786    fn default() -> Self {
10787        Self::DEFAULT.clone()
10788    }
10789}
10790impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10791    type Message = MavMessage;
10792    const ID: u32 = 411u32;
10793    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10794    const EXTRA_CRC: u8 = 106u8;
10795    const ENCODED_LEN: usize = 3usize;
10796    fn deser(
10797        _version: MavlinkVersion,
10798        __input: &[u8],
10799    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10800        let avail_len = __input.len();
10801        let mut payload_buf = [0; Self::ENCODED_LEN];
10802        let mut buf = if avail_len < Self::ENCODED_LEN {
10803            payload_buf[0..avail_len].copy_from_slice(__input);
10804            Bytes::new(&payload_buf)
10805        } else {
10806            Bytes::new(__input)
10807        };
10808        let mut __struct = Self::default();
10809        __struct.sequence = buf.get_u16_le()?;
10810        let tmp = buf.get_u8()?;
10811        __struct.flags =
10812            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10813                enum_type: "MavEventCurrentSequenceFlags",
10814                value: tmp as u64,
10815            })?;
10816        Ok(__struct)
10817    }
10818    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10819        let mut __tmp = BytesMut::new(bytes);
10820        #[allow(clippy::absurd_extreme_comparisons)]
10821        #[allow(unused_comparisons)]
10822        if __tmp.remaining() < Self::ENCODED_LEN {
10823            panic!(
10824                "buffer is too small (need {} bytes, but got {})",
10825                Self::ENCODED_LEN,
10826                __tmp.remaining(),
10827            )
10828        }
10829        __tmp.put_u16_le(self.sequence);
10830        __tmp.put_u8(self.flags as u8);
10831        if matches!(version, MavlinkVersion::V2) {
10832            let len = __tmp.len();
10833            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10834        } else {
10835            __tmp.len()
10836        }
10837    }
10838}
10839#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10840#[doc = ""]
10841#[doc = "ID: 436"]
10842#[derive(Debug, Clone, PartialEq)]
10843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10845#[cfg_attr(feature = "ts", derive(TS))]
10846#[cfg_attr(feature = "ts", ts(export))]
10847pub struct CURRENT_MODE_DATA {
10848    #[doc = "A bitfield for use for autopilot-specific flags"]
10849    pub custom_mode: u32,
10850    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10851    pub intended_custom_mode: u32,
10852    #[doc = "Standard mode."]
10853    pub standard_mode: MavStandardMode,
10854}
10855impl CURRENT_MODE_DATA {
10856    pub const ENCODED_LEN: usize = 9usize;
10857    pub const DEFAULT: Self = Self {
10858        custom_mode: 0_u32,
10859        intended_custom_mode: 0_u32,
10860        standard_mode: MavStandardMode::DEFAULT,
10861    };
10862    #[cfg(feature = "arbitrary")]
10863    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10864        use arbitrary::{Arbitrary, Unstructured};
10865        let mut buf = [0u8; 1024];
10866        rng.fill_bytes(&mut buf);
10867        let mut unstructured = Unstructured::new(&buf);
10868        Self::arbitrary(&mut unstructured).unwrap_or_default()
10869    }
10870}
10871impl Default for CURRENT_MODE_DATA {
10872    fn default() -> Self {
10873        Self::DEFAULT.clone()
10874    }
10875}
10876impl MessageData for CURRENT_MODE_DATA {
10877    type Message = MavMessage;
10878    const ID: u32 = 436u32;
10879    const NAME: &'static str = "CURRENT_MODE";
10880    const EXTRA_CRC: u8 = 193u8;
10881    const ENCODED_LEN: usize = 9usize;
10882    fn deser(
10883        _version: MavlinkVersion,
10884        __input: &[u8],
10885    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10886        let avail_len = __input.len();
10887        let mut payload_buf = [0; Self::ENCODED_LEN];
10888        let mut buf = if avail_len < Self::ENCODED_LEN {
10889            payload_buf[0..avail_len].copy_from_slice(__input);
10890            Bytes::new(&payload_buf)
10891        } else {
10892            Bytes::new(__input)
10893        };
10894        let mut __struct = Self::default();
10895        __struct.custom_mode = buf.get_u32_le()?;
10896        __struct.intended_custom_mode = buf.get_u32_le()?;
10897        let tmp = buf.get_u8()?;
10898        __struct.standard_mode =
10899            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10900                enum_type: "MavStandardMode",
10901                value: tmp as u64,
10902            })?;
10903        Ok(__struct)
10904    }
10905    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10906        let mut __tmp = BytesMut::new(bytes);
10907        #[allow(clippy::absurd_extreme_comparisons)]
10908        #[allow(unused_comparisons)]
10909        if __tmp.remaining() < Self::ENCODED_LEN {
10910            panic!(
10911                "buffer is too small (need {} bytes, but got {})",
10912                Self::ENCODED_LEN,
10913                __tmp.remaining(),
10914            )
10915        }
10916        __tmp.put_u32_le(self.custom_mode);
10917        __tmp.put_u32_le(self.intended_custom_mode);
10918        __tmp.put_u8(self.standard_mode as u8);
10919        if matches!(version, MavlinkVersion::V2) {
10920            let len = __tmp.len();
10921            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10922        } else {
10923            __tmp.len()
10924        }
10925    }
10926}
10927#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10928#[doc = "Data stream status information."]
10929#[doc = ""]
10930#[doc = "ID: 67"]
10931#[derive(Debug, Clone, PartialEq)]
10932#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10934#[cfg_attr(feature = "ts", derive(TS))]
10935#[cfg_attr(feature = "ts", ts(export))]
10936pub struct DATA_STREAM_DATA {
10937    #[doc = "The message rate"]
10938    pub message_rate: u16,
10939    #[doc = "The ID of the requested data stream"]
10940    pub stream_id: u8,
10941    #[doc = "1 stream is enabled, 0 stream is stopped."]
10942    pub on_off: u8,
10943}
10944impl DATA_STREAM_DATA {
10945    pub const ENCODED_LEN: usize = 4usize;
10946    pub const DEFAULT: Self = Self {
10947        message_rate: 0_u16,
10948        stream_id: 0_u8,
10949        on_off: 0_u8,
10950    };
10951    #[cfg(feature = "arbitrary")]
10952    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10953        use arbitrary::{Arbitrary, Unstructured};
10954        let mut buf = [0u8; 1024];
10955        rng.fill_bytes(&mut buf);
10956        let mut unstructured = Unstructured::new(&buf);
10957        Self::arbitrary(&mut unstructured).unwrap_or_default()
10958    }
10959}
10960impl Default for DATA_STREAM_DATA {
10961    fn default() -> Self {
10962        Self::DEFAULT.clone()
10963    }
10964}
10965impl MessageData for DATA_STREAM_DATA {
10966    type Message = MavMessage;
10967    const ID: u32 = 67u32;
10968    const NAME: &'static str = "DATA_STREAM";
10969    const EXTRA_CRC: u8 = 21u8;
10970    const ENCODED_LEN: usize = 4usize;
10971    fn deser(
10972        _version: MavlinkVersion,
10973        __input: &[u8],
10974    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10975        let avail_len = __input.len();
10976        let mut payload_buf = [0; Self::ENCODED_LEN];
10977        let mut buf = if avail_len < Self::ENCODED_LEN {
10978            payload_buf[0..avail_len].copy_from_slice(__input);
10979            Bytes::new(&payload_buf)
10980        } else {
10981            Bytes::new(__input)
10982        };
10983        let mut __struct = Self::default();
10984        __struct.message_rate = buf.get_u16_le()?;
10985        __struct.stream_id = buf.get_u8()?;
10986        __struct.on_off = buf.get_u8()?;
10987        Ok(__struct)
10988    }
10989    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10990        let mut __tmp = BytesMut::new(bytes);
10991        #[allow(clippy::absurd_extreme_comparisons)]
10992        #[allow(unused_comparisons)]
10993        if __tmp.remaining() < Self::ENCODED_LEN {
10994            panic!(
10995                "buffer is too small (need {} bytes, but got {})",
10996                Self::ENCODED_LEN,
10997                __tmp.remaining(),
10998            )
10999        }
11000        __tmp.put_u16_le(self.message_rate);
11001        __tmp.put_u8(self.stream_id);
11002        __tmp.put_u8(self.on_off);
11003        if matches!(version, MavlinkVersion::V2) {
11004            let len = __tmp.len();
11005            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11006        } else {
11007            __tmp.len()
11008        }
11009    }
11010}
11011#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11012#[doc = ""]
11013#[doc = "ID: 130"]
11014#[derive(Debug, Clone, PartialEq)]
11015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11017#[cfg_attr(feature = "ts", derive(TS))]
11018#[cfg_attr(feature = "ts", ts(export))]
11019pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
11020    #[doc = "total data size (set on ACK only)."]
11021    pub size: u32,
11022    #[doc = "Width of a matrix or image."]
11023    pub width: u16,
11024    #[doc = "Height of a matrix or image."]
11025    pub height: u16,
11026    #[doc = "Number of packets being sent (set on ACK only)."]
11027    pub packets: u16,
11028    #[doc = "Type of requested/acknowledged data."]
11029    pub mavtype: MavlinkDataStreamType,
11030    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
11031    pub payload: u8,
11032    #[doc = "JPEG quality. Values: [1-100]."]
11033    pub jpg_quality: u8,
11034}
11035impl DATA_TRANSMISSION_HANDSHAKE_DATA {
11036    pub const ENCODED_LEN: usize = 13usize;
11037    pub const DEFAULT: Self = Self {
11038        size: 0_u32,
11039        width: 0_u16,
11040        height: 0_u16,
11041        packets: 0_u16,
11042        mavtype: MavlinkDataStreamType::DEFAULT,
11043        payload: 0_u8,
11044        jpg_quality: 0_u8,
11045    };
11046    #[cfg(feature = "arbitrary")]
11047    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11048        use arbitrary::{Arbitrary, Unstructured};
11049        let mut buf = [0u8; 1024];
11050        rng.fill_bytes(&mut buf);
11051        let mut unstructured = Unstructured::new(&buf);
11052        Self::arbitrary(&mut unstructured).unwrap_or_default()
11053    }
11054}
11055impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
11056    fn default() -> Self {
11057        Self::DEFAULT.clone()
11058    }
11059}
11060impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
11061    type Message = MavMessage;
11062    const ID: u32 = 130u32;
11063    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
11064    const EXTRA_CRC: u8 = 29u8;
11065    const ENCODED_LEN: usize = 13usize;
11066    fn deser(
11067        _version: MavlinkVersion,
11068        __input: &[u8],
11069    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11070        let avail_len = __input.len();
11071        let mut payload_buf = [0; Self::ENCODED_LEN];
11072        let mut buf = if avail_len < Self::ENCODED_LEN {
11073            payload_buf[0..avail_len].copy_from_slice(__input);
11074            Bytes::new(&payload_buf)
11075        } else {
11076            Bytes::new(__input)
11077        };
11078        let mut __struct = Self::default();
11079        __struct.size = buf.get_u32_le()?;
11080        __struct.width = buf.get_u16_le()?;
11081        __struct.height = buf.get_u16_le()?;
11082        __struct.packets = buf.get_u16_le()?;
11083        let tmp = buf.get_u8()?;
11084        __struct.mavtype =
11085            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11086                enum_type: "MavlinkDataStreamType",
11087                value: tmp as u64,
11088            })?;
11089        __struct.payload = buf.get_u8()?;
11090        __struct.jpg_quality = buf.get_u8()?;
11091        Ok(__struct)
11092    }
11093    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11094        let mut __tmp = BytesMut::new(bytes);
11095        #[allow(clippy::absurd_extreme_comparisons)]
11096        #[allow(unused_comparisons)]
11097        if __tmp.remaining() < Self::ENCODED_LEN {
11098            panic!(
11099                "buffer is too small (need {} bytes, but got {})",
11100                Self::ENCODED_LEN,
11101                __tmp.remaining(),
11102            )
11103        }
11104        __tmp.put_u32_le(self.size);
11105        __tmp.put_u16_le(self.width);
11106        __tmp.put_u16_le(self.height);
11107        __tmp.put_u16_le(self.packets);
11108        __tmp.put_u8(self.mavtype as u8);
11109        __tmp.put_u8(self.payload);
11110        __tmp.put_u8(self.jpg_quality);
11111        if matches!(version, MavlinkVersion::V2) {
11112            let len = __tmp.len();
11113            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11114        } else {
11115            __tmp.len()
11116        }
11117    }
11118}
11119#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
11120#[doc = ""]
11121#[doc = "ID: 254"]
11122#[derive(Debug, Clone, PartialEq)]
11123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11124#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11125#[cfg_attr(feature = "ts", derive(TS))]
11126#[cfg_attr(feature = "ts", ts(export))]
11127pub struct DEBUG_DATA {
11128    #[doc = "Timestamp (time since system boot)."]
11129    pub time_boot_ms: u32,
11130    #[doc = "DEBUG value"]
11131    pub value: f32,
11132    #[doc = "index of debug variable"]
11133    pub ind: u8,
11134}
11135impl DEBUG_DATA {
11136    pub const ENCODED_LEN: usize = 9usize;
11137    pub const DEFAULT: Self = Self {
11138        time_boot_ms: 0_u32,
11139        value: 0.0_f32,
11140        ind: 0_u8,
11141    };
11142    #[cfg(feature = "arbitrary")]
11143    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11144        use arbitrary::{Arbitrary, Unstructured};
11145        let mut buf = [0u8; 1024];
11146        rng.fill_bytes(&mut buf);
11147        let mut unstructured = Unstructured::new(&buf);
11148        Self::arbitrary(&mut unstructured).unwrap_or_default()
11149    }
11150}
11151impl Default for DEBUG_DATA {
11152    fn default() -> Self {
11153        Self::DEFAULT.clone()
11154    }
11155}
11156impl MessageData for DEBUG_DATA {
11157    type Message = MavMessage;
11158    const ID: u32 = 254u32;
11159    const NAME: &'static str = "DEBUG";
11160    const EXTRA_CRC: u8 = 46u8;
11161    const ENCODED_LEN: usize = 9usize;
11162    fn deser(
11163        _version: MavlinkVersion,
11164        __input: &[u8],
11165    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11166        let avail_len = __input.len();
11167        let mut payload_buf = [0; Self::ENCODED_LEN];
11168        let mut buf = if avail_len < Self::ENCODED_LEN {
11169            payload_buf[0..avail_len].copy_from_slice(__input);
11170            Bytes::new(&payload_buf)
11171        } else {
11172            Bytes::new(__input)
11173        };
11174        let mut __struct = Self::default();
11175        __struct.time_boot_ms = buf.get_u32_le()?;
11176        __struct.value = buf.get_f32_le()?;
11177        __struct.ind = buf.get_u8()?;
11178        Ok(__struct)
11179    }
11180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11181        let mut __tmp = BytesMut::new(bytes);
11182        #[allow(clippy::absurd_extreme_comparisons)]
11183        #[allow(unused_comparisons)]
11184        if __tmp.remaining() < Self::ENCODED_LEN {
11185            panic!(
11186                "buffer is too small (need {} bytes, but got {})",
11187                Self::ENCODED_LEN,
11188                __tmp.remaining(),
11189            )
11190        }
11191        __tmp.put_u32_le(self.time_boot_ms);
11192        __tmp.put_f32_le(self.value);
11193        __tmp.put_u8(self.ind);
11194        if matches!(version, MavlinkVersion::V2) {
11195            let len = __tmp.len();
11196            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11197        } else {
11198            __tmp.len()
11199        }
11200    }
11201}
11202#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
11203#[doc = ""]
11204#[doc = "ID: 350"]
11205#[derive(Debug, Clone, PartialEq)]
11206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11207#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11208#[cfg_attr(feature = "ts", derive(TS))]
11209#[cfg_attr(feature = "ts", ts(export))]
11210pub struct DEBUG_FLOAT_ARRAY_DATA {
11211    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11212    pub time_usec: u64,
11213    #[doc = "Unique ID used to discriminate between arrays"]
11214    pub array_id: u16,
11215    #[doc = "Name, for human-friendly display in a Ground Control Station"]
11216    #[cfg_attr(feature = "ts", ts(type = "string"))]
11217    pub name: CharArray<10>,
11218    #[doc = "data"]
11219    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11220    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11221    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11222    pub data: [f32; 58],
11223}
11224impl DEBUG_FLOAT_ARRAY_DATA {
11225    pub const ENCODED_LEN: usize = 252usize;
11226    pub const DEFAULT: Self = Self {
11227        time_usec: 0_u64,
11228        array_id: 0_u16,
11229        name: CharArray::new([0_u8; 10usize]),
11230        data: [0.0_f32; 58usize],
11231    };
11232    #[cfg(feature = "arbitrary")]
11233    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11234        use arbitrary::{Arbitrary, Unstructured};
11235        let mut buf = [0u8; 1024];
11236        rng.fill_bytes(&mut buf);
11237        let mut unstructured = Unstructured::new(&buf);
11238        Self::arbitrary(&mut unstructured).unwrap_or_default()
11239    }
11240}
11241impl Default for DEBUG_FLOAT_ARRAY_DATA {
11242    fn default() -> Self {
11243        Self::DEFAULT.clone()
11244    }
11245}
11246impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
11247    type Message = MavMessage;
11248    const ID: u32 = 350u32;
11249    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
11250    const EXTRA_CRC: u8 = 232u8;
11251    const ENCODED_LEN: usize = 252usize;
11252    fn deser(
11253        _version: MavlinkVersion,
11254        __input: &[u8],
11255    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11256        let avail_len = __input.len();
11257        let mut payload_buf = [0; Self::ENCODED_LEN];
11258        let mut buf = if avail_len < Self::ENCODED_LEN {
11259            payload_buf[0..avail_len].copy_from_slice(__input);
11260            Bytes::new(&payload_buf)
11261        } else {
11262            Bytes::new(__input)
11263        };
11264        let mut __struct = Self::default();
11265        __struct.time_usec = buf.get_u64_le()?;
11266        __struct.array_id = buf.get_u16_le()?;
11267        let mut tmp = [0_u8; 10usize];
11268        for v in &mut tmp {
11269            *v = buf.get_u8()?;
11270        }
11271        __struct.name = CharArray::new(tmp);
11272        for v in &mut __struct.data {
11273            let val = buf.get_f32_le()?;
11274            *v = val;
11275        }
11276        Ok(__struct)
11277    }
11278    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11279        let mut __tmp = BytesMut::new(bytes);
11280        #[allow(clippy::absurd_extreme_comparisons)]
11281        #[allow(unused_comparisons)]
11282        if __tmp.remaining() < Self::ENCODED_LEN {
11283            panic!(
11284                "buffer is too small (need {} bytes, but got {})",
11285                Self::ENCODED_LEN,
11286                __tmp.remaining(),
11287            )
11288        }
11289        __tmp.put_u64_le(self.time_usec);
11290        __tmp.put_u16_le(self.array_id);
11291        for val in &self.name {
11292            __tmp.put_u8(*val);
11293        }
11294        if matches!(version, MavlinkVersion::V2) {
11295            for val in &self.data {
11296                __tmp.put_f32_le(*val);
11297            }
11298            let len = __tmp.len();
11299            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11300        } else {
11301            __tmp.len()
11302        }
11303    }
11304}
11305#[doc = "To debug something using a named 3D vector."]
11306#[doc = ""]
11307#[doc = "ID: 250"]
11308#[derive(Debug, Clone, PartialEq)]
11309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11310#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11311#[cfg_attr(feature = "ts", derive(TS))]
11312#[cfg_attr(feature = "ts", ts(export))]
11313pub struct DEBUG_VECT_DATA {
11314    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11315    pub time_usec: u64,
11316    #[doc = "x"]
11317    pub x: f32,
11318    #[doc = "y"]
11319    pub y: f32,
11320    #[doc = "z"]
11321    pub z: f32,
11322    #[doc = "Name"]
11323    #[cfg_attr(feature = "ts", ts(type = "string"))]
11324    pub name: CharArray<10>,
11325}
11326impl DEBUG_VECT_DATA {
11327    pub const ENCODED_LEN: usize = 30usize;
11328    pub const DEFAULT: Self = Self {
11329        time_usec: 0_u64,
11330        x: 0.0_f32,
11331        y: 0.0_f32,
11332        z: 0.0_f32,
11333        name: CharArray::new([0_u8; 10usize]),
11334    };
11335    #[cfg(feature = "arbitrary")]
11336    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11337        use arbitrary::{Arbitrary, Unstructured};
11338        let mut buf = [0u8; 1024];
11339        rng.fill_bytes(&mut buf);
11340        let mut unstructured = Unstructured::new(&buf);
11341        Self::arbitrary(&mut unstructured).unwrap_or_default()
11342    }
11343}
11344impl Default for DEBUG_VECT_DATA {
11345    fn default() -> Self {
11346        Self::DEFAULT.clone()
11347    }
11348}
11349impl MessageData for DEBUG_VECT_DATA {
11350    type Message = MavMessage;
11351    const ID: u32 = 250u32;
11352    const NAME: &'static str = "DEBUG_VECT";
11353    const EXTRA_CRC: u8 = 49u8;
11354    const ENCODED_LEN: usize = 30usize;
11355    fn deser(
11356        _version: MavlinkVersion,
11357        __input: &[u8],
11358    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11359        let avail_len = __input.len();
11360        let mut payload_buf = [0; Self::ENCODED_LEN];
11361        let mut buf = if avail_len < Self::ENCODED_LEN {
11362            payload_buf[0..avail_len].copy_from_slice(__input);
11363            Bytes::new(&payload_buf)
11364        } else {
11365            Bytes::new(__input)
11366        };
11367        let mut __struct = Self::default();
11368        __struct.time_usec = buf.get_u64_le()?;
11369        __struct.x = buf.get_f32_le()?;
11370        __struct.y = buf.get_f32_le()?;
11371        __struct.z = buf.get_f32_le()?;
11372        let mut tmp = [0_u8; 10usize];
11373        for v in &mut tmp {
11374            *v = buf.get_u8()?;
11375        }
11376        __struct.name = CharArray::new(tmp);
11377        Ok(__struct)
11378    }
11379    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11380        let mut __tmp = BytesMut::new(bytes);
11381        #[allow(clippy::absurd_extreme_comparisons)]
11382        #[allow(unused_comparisons)]
11383        if __tmp.remaining() < Self::ENCODED_LEN {
11384            panic!(
11385                "buffer is too small (need {} bytes, but got {})",
11386                Self::ENCODED_LEN,
11387                __tmp.remaining(),
11388            )
11389        }
11390        __tmp.put_u64_le(self.time_usec);
11391        __tmp.put_f32_le(self.x);
11392        __tmp.put_f32_le(self.y);
11393        __tmp.put_f32_le(self.z);
11394        for val in &self.name {
11395            __tmp.put_u8(*val);
11396        }
11397        if matches!(version, MavlinkVersion::V2) {
11398            let len = __tmp.len();
11399            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11400        } else {
11401            __tmp.len()
11402        }
11403    }
11404}
11405#[doc = "Distance sensor information for an onboard rangefinder."]
11406#[doc = ""]
11407#[doc = "ID: 132"]
11408#[derive(Debug, Clone, PartialEq)]
11409#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11410#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11411#[cfg_attr(feature = "ts", derive(TS))]
11412#[cfg_attr(feature = "ts", ts(export))]
11413pub struct DISTANCE_SENSOR_DATA {
11414    #[doc = "Timestamp (time since system boot)."]
11415    pub time_boot_ms: u32,
11416    #[doc = "Minimum distance the sensor can measure"]
11417    pub min_distance: u16,
11418    #[doc = "Maximum distance the sensor can measure"]
11419    pub max_distance: u16,
11420    #[doc = "Current distance reading"]
11421    pub current_distance: u16,
11422    #[doc = "Type of distance sensor."]
11423    pub mavtype: MavDistanceSensor,
11424    #[doc = "Onboard ID of the sensor"]
11425    pub id: u8,
11426    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
11427    pub orientation: MavSensorOrientation,
11428    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
11429    pub covariance: u8,
11430    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11431    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11432    pub horizontal_fov: f32,
11433    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11434    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11435    pub vertical_fov: f32,
11436    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
11437    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11438    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11439    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11440    pub quaternion: [f32; 4],
11441    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
11442    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11443    pub signal_quality: u8,
11444}
11445impl DISTANCE_SENSOR_DATA {
11446    pub const ENCODED_LEN: usize = 39usize;
11447    pub const DEFAULT: Self = Self {
11448        time_boot_ms: 0_u32,
11449        min_distance: 0_u16,
11450        max_distance: 0_u16,
11451        current_distance: 0_u16,
11452        mavtype: MavDistanceSensor::DEFAULT,
11453        id: 0_u8,
11454        orientation: MavSensorOrientation::DEFAULT,
11455        covariance: 0_u8,
11456        horizontal_fov: 0.0_f32,
11457        vertical_fov: 0.0_f32,
11458        quaternion: [0.0_f32; 4usize],
11459        signal_quality: 0_u8,
11460    };
11461    #[cfg(feature = "arbitrary")]
11462    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11463        use arbitrary::{Arbitrary, Unstructured};
11464        let mut buf = [0u8; 1024];
11465        rng.fill_bytes(&mut buf);
11466        let mut unstructured = Unstructured::new(&buf);
11467        Self::arbitrary(&mut unstructured).unwrap_or_default()
11468    }
11469}
11470impl Default for DISTANCE_SENSOR_DATA {
11471    fn default() -> Self {
11472        Self::DEFAULT.clone()
11473    }
11474}
11475impl MessageData for DISTANCE_SENSOR_DATA {
11476    type Message = MavMessage;
11477    const ID: u32 = 132u32;
11478    const NAME: &'static str = "DISTANCE_SENSOR";
11479    const EXTRA_CRC: u8 = 85u8;
11480    const ENCODED_LEN: usize = 39usize;
11481    fn deser(
11482        _version: MavlinkVersion,
11483        __input: &[u8],
11484    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11485        let avail_len = __input.len();
11486        let mut payload_buf = [0; Self::ENCODED_LEN];
11487        let mut buf = if avail_len < Self::ENCODED_LEN {
11488            payload_buf[0..avail_len].copy_from_slice(__input);
11489            Bytes::new(&payload_buf)
11490        } else {
11491            Bytes::new(__input)
11492        };
11493        let mut __struct = Self::default();
11494        __struct.time_boot_ms = buf.get_u32_le()?;
11495        __struct.min_distance = buf.get_u16_le()?;
11496        __struct.max_distance = buf.get_u16_le()?;
11497        __struct.current_distance = buf.get_u16_le()?;
11498        let tmp = buf.get_u8()?;
11499        __struct.mavtype =
11500            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11501                enum_type: "MavDistanceSensor",
11502                value: tmp as u64,
11503            })?;
11504        __struct.id = buf.get_u8()?;
11505        let tmp = buf.get_u8()?;
11506        __struct.orientation =
11507            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11508                enum_type: "MavSensorOrientation",
11509                value: tmp as u64,
11510            })?;
11511        __struct.covariance = buf.get_u8()?;
11512        __struct.horizontal_fov = buf.get_f32_le()?;
11513        __struct.vertical_fov = buf.get_f32_le()?;
11514        for v in &mut __struct.quaternion {
11515            let val = buf.get_f32_le()?;
11516            *v = val;
11517        }
11518        __struct.signal_quality = buf.get_u8()?;
11519        Ok(__struct)
11520    }
11521    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11522        let mut __tmp = BytesMut::new(bytes);
11523        #[allow(clippy::absurd_extreme_comparisons)]
11524        #[allow(unused_comparisons)]
11525        if __tmp.remaining() < Self::ENCODED_LEN {
11526            panic!(
11527                "buffer is too small (need {} bytes, but got {})",
11528                Self::ENCODED_LEN,
11529                __tmp.remaining(),
11530            )
11531        }
11532        __tmp.put_u32_le(self.time_boot_ms);
11533        __tmp.put_u16_le(self.min_distance);
11534        __tmp.put_u16_le(self.max_distance);
11535        __tmp.put_u16_le(self.current_distance);
11536        __tmp.put_u8(self.mavtype as u8);
11537        __tmp.put_u8(self.id);
11538        __tmp.put_u8(self.orientation as u8);
11539        __tmp.put_u8(self.covariance);
11540        if matches!(version, MavlinkVersion::V2) {
11541            __tmp.put_f32_le(self.horizontal_fov);
11542            __tmp.put_f32_le(self.vertical_fov);
11543            for val in &self.quaternion {
11544                __tmp.put_f32_le(*val);
11545            }
11546            __tmp.put_u8(self.signal_quality);
11547            let len = __tmp.len();
11548            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11549        } else {
11550            __tmp.len()
11551        }
11552    }
11553}
11554#[doc = "EFI status output."]
11555#[doc = ""]
11556#[doc = "ID: 225"]
11557#[derive(Debug, Clone, PartialEq)]
11558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11559#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11560#[cfg_attr(feature = "ts", derive(TS))]
11561#[cfg_attr(feature = "ts", ts(export))]
11562pub struct EFI_STATUS_DATA {
11563    #[doc = "ECU index"]
11564    pub ecu_index: f32,
11565    #[doc = "RPM"]
11566    pub rpm: f32,
11567    #[doc = "Fuel consumed"]
11568    pub fuel_consumed: f32,
11569    #[doc = "Fuel flow rate"]
11570    pub fuel_flow: f32,
11571    #[doc = "Engine load"]
11572    pub engine_load: f32,
11573    #[doc = "Throttle position"]
11574    pub throttle_position: f32,
11575    #[doc = "Spark dwell time"]
11576    pub spark_dwell_time: f32,
11577    #[doc = "Barometric pressure"]
11578    pub barometric_pressure: f32,
11579    #[doc = "Intake manifold pressure("]
11580    pub intake_manifold_pressure: f32,
11581    #[doc = "Intake manifold temperature"]
11582    pub intake_manifold_temperature: f32,
11583    #[doc = "Cylinder head temperature"]
11584    pub cylinder_head_temperature: f32,
11585    #[doc = "Ignition timing (Crank angle degrees)"]
11586    pub ignition_timing: f32,
11587    #[doc = "Injection time"]
11588    pub injection_time: f32,
11589    #[doc = "Exhaust gas temperature"]
11590    pub exhaust_gas_temperature: f32,
11591    #[doc = "Output throttle"]
11592    pub throttle_out: f32,
11593    #[doc = "Pressure/temperature compensation"]
11594    pub pt_compensation: f32,
11595    #[doc = "EFI health status"]
11596    pub health: u8,
11597    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
11598    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11599    pub ignition_voltage: f32,
11600    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11601    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11602    pub fuel_pressure: f32,
11603}
11604impl EFI_STATUS_DATA {
11605    pub const ENCODED_LEN: usize = 73usize;
11606    pub const DEFAULT: Self = Self {
11607        ecu_index: 0.0_f32,
11608        rpm: 0.0_f32,
11609        fuel_consumed: 0.0_f32,
11610        fuel_flow: 0.0_f32,
11611        engine_load: 0.0_f32,
11612        throttle_position: 0.0_f32,
11613        spark_dwell_time: 0.0_f32,
11614        barometric_pressure: 0.0_f32,
11615        intake_manifold_pressure: 0.0_f32,
11616        intake_manifold_temperature: 0.0_f32,
11617        cylinder_head_temperature: 0.0_f32,
11618        ignition_timing: 0.0_f32,
11619        injection_time: 0.0_f32,
11620        exhaust_gas_temperature: 0.0_f32,
11621        throttle_out: 0.0_f32,
11622        pt_compensation: 0.0_f32,
11623        health: 0_u8,
11624        ignition_voltage: 0.0_f32,
11625        fuel_pressure: 0.0_f32,
11626    };
11627    #[cfg(feature = "arbitrary")]
11628    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11629        use arbitrary::{Arbitrary, Unstructured};
11630        let mut buf = [0u8; 1024];
11631        rng.fill_bytes(&mut buf);
11632        let mut unstructured = Unstructured::new(&buf);
11633        Self::arbitrary(&mut unstructured).unwrap_or_default()
11634    }
11635}
11636impl Default for EFI_STATUS_DATA {
11637    fn default() -> Self {
11638        Self::DEFAULT.clone()
11639    }
11640}
11641impl MessageData for EFI_STATUS_DATA {
11642    type Message = MavMessage;
11643    const ID: u32 = 225u32;
11644    const NAME: &'static str = "EFI_STATUS";
11645    const EXTRA_CRC: u8 = 208u8;
11646    const ENCODED_LEN: usize = 73usize;
11647    fn deser(
11648        _version: MavlinkVersion,
11649        __input: &[u8],
11650    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11651        let avail_len = __input.len();
11652        let mut payload_buf = [0; Self::ENCODED_LEN];
11653        let mut buf = if avail_len < Self::ENCODED_LEN {
11654            payload_buf[0..avail_len].copy_from_slice(__input);
11655            Bytes::new(&payload_buf)
11656        } else {
11657            Bytes::new(__input)
11658        };
11659        let mut __struct = Self::default();
11660        __struct.ecu_index = buf.get_f32_le()?;
11661        __struct.rpm = buf.get_f32_le()?;
11662        __struct.fuel_consumed = buf.get_f32_le()?;
11663        __struct.fuel_flow = buf.get_f32_le()?;
11664        __struct.engine_load = buf.get_f32_le()?;
11665        __struct.throttle_position = buf.get_f32_le()?;
11666        __struct.spark_dwell_time = buf.get_f32_le()?;
11667        __struct.barometric_pressure = buf.get_f32_le()?;
11668        __struct.intake_manifold_pressure = buf.get_f32_le()?;
11669        __struct.intake_manifold_temperature = buf.get_f32_le()?;
11670        __struct.cylinder_head_temperature = buf.get_f32_le()?;
11671        __struct.ignition_timing = buf.get_f32_le()?;
11672        __struct.injection_time = buf.get_f32_le()?;
11673        __struct.exhaust_gas_temperature = buf.get_f32_le()?;
11674        __struct.throttle_out = buf.get_f32_le()?;
11675        __struct.pt_compensation = buf.get_f32_le()?;
11676        __struct.health = buf.get_u8()?;
11677        __struct.ignition_voltage = buf.get_f32_le()?;
11678        __struct.fuel_pressure = buf.get_f32_le()?;
11679        Ok(__struct)
11680    }
11681    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11682        let mut __tmp = BytesMut::new(bytes);
11683        #[allow(clippy::absurd_extreme_comparisons)]
11684        #[allow(unused_comparisons)]
11685        if __tmp.remaining() < Self::ENCODED_LEN {
11686            panic!(
11687                "buffer is too small (need {} bytes, but got {})",
11688                Self::ENCODED_LEN,
11689                __tmp.remaining(),
11690            )
11691        }
11692        __tmp.put_f32_le(self.ecu_index);
11693        __tmp.put_f32_le(self.rpm);
11694        __tmp.put_f32_le(self.fuel_consumed);
11695        __tmp.put_f32_le(self.fuel_flow);
11696        __tmp.put_f32_le(self.engine_load);
11697        __tmp.put_f32_le(self.throttle_position);
11698        __tmp.put_f32_le(self.spark_dwell_time);
11699        __tmp.put_f32_le(self.barometric_pressure);
11700        __tmp.put_f32_le(self.intake_manifold_pressure);
11701        __tmp.put_f32_le(self.intake_manifold_temperature);
11702        __tmp.put_f32_le(self.cylinder_head_temperature);
11703        __tmp.put_f32_le(self.ignition_timing);
11704        __tmp.put_f32_le(self.injection_time);
11705        __tmp.put_f32_le(self.exhaust_gas_temperature);
11706        __tmp.put_f32_le(self.throttle_out);
11707        __tmp.put_f32_le(self.pt_compensation);
11708        __tmp.put_u8(self.health);
11709        if matches!(version, MavlinkVersion::V2) {
11710            __tmp.put_f32_le(self.ignition_voltage);
11711            __tmp.put_f32_le(self.fuel_pressure);
11712            let len = __tmp.len();
11713            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11714        } else {
11715            __tmp.len()
11716        }
11717    }
11718}
11719#[doc = "Extended EKF state estimates for ASLUAVs."]
11720#[doc = ""]
11721#[doc = "ID: 8007"]
11722#[derive(Debug, Clone, PartialEq)]
11723#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11724#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11725#[cfg_attr(feature = "ts", derive(TS))]
11726#[cfg_attr(feature = "ts", ts(export))]
11727pub struct EKF_EXT_DATA {
11728    #[doc = "Time since system start"]
11729    pub timestamp: u64,
11730    #[doc = "Magnitude of wind velocity (in lateral inertial plane)"]
11731    pub Windspeed: f32,
11732    #[doc = "Wind heading angle from North"]
11733    pub WindDir: f32,
11734    #[doc = "Z (Down) component of inertial wind velocity"]
11735    pub WindZ: f32,
11736    #[doc = "Magnitude of air velocity"]
11737    pub Airspeed: f32,
11738    #[doc = "Sideslip angle"]
11739    pub beta: f32,
11740    #[doc = "Angle of attack"]
11741    pub alpha: f32,
11742}
11743impl EKF_EXT_DATA {
11744    pub const ENCODED_LEN: usize = 32usize;
11745    pub const DEFAULT: Self = Self {
11746        timestamp: 0_u64,
11747        Windspeed: 0.0_f32,
11748        WindDir: 0.0_f32,
11749        WindZ: 0.0_f32,
11750        Airspeed: 0.0_f32,
11751        beta: 0.0_f32,
11752        alpha: 0.0_f32,
11753    };
11754    #[cfg(feature = "arbitrary")]
11755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11756        use arbitrary::{Arbitrary, Unstructured};
11757        let mut buf = [0u8; 1024];
11758        rng.fill_bytes(&mut buf);
11759        let mut unstructured = Unstructured::new(&buf);
11760        Self::arbitrary(&mut unstructured).unwrap_or_default()
11761    }
11762}
11763impl Default for EKF_EXT_DATA {
11764    fn default() -> Self {
11765        Self::DEFAULT.clone()
11766    }
11767}
11768impl MessageData for EKF_EXT_DATA {
11769    type Message = MavMessage;
11770    const ID: u32 = 8007u32;
11771    const NAME: &'static str = "EKF_EXT";
11772    const EXTRA_CRC: u8 = 64u8;
11773    const ENCODED_LEN: usize = 32usize;
11774    fn deser(
11775        _version: MavlinkVersion,
11776        __input: &[u8],
11777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11778        let avail_len = __input.len();
11779        let mut payload_buf = [0; Self::ENCODED_LEN];
11780        let mut buf = if avail_len < Self::ENCODED_LEN {
11781            payload_buf[0..avail_len].copy_from_slice(__input);
11782            Bytes::new(&payload_buf)
11783        } else {
11784            Bytes::new(__input)
11785        };
11786        let mut __struct = Self::default();
11787        __struct.timestamp = buf.get_u64_le()?;
11788        __struct.Windspeed = buf.get_f32_le()?;
11789        __struct.WindDir = buf.get_f32_le()?;
11790        __struct.WindZ = buf.get_f32_le()?;
11791        __struct.Airspeed = buf.get_f32_le()?;
11792        __struct.beta = buf.get_f32_le()?;
11793        __struct.alpha = buf.get_f32_le()?;
11794        Ok(__struct)
11795    }
11796    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11797        let mut __tmp = BytesMut::new(bytes);
11798        #[allow(clippy::absurd_extreme_comparisons)]
11799        #[allow(unused_comparisons)]
11800        if __tmp.remaining() < Self::ENCODED_LEN {
11801            panic!(
11802                "buffer is too small (need {} bytes, but got {})",
11803                Self::ENCODED_LEN,
11804                __tmp.remaining(),
11805            )
11806        }
11807        __tmp.put_u64_le(self.timestamp);
11808        __tmp.put_f32_le(self.Windspeed);
11809        __tmp.put_f32_le(self.WindDir);
11810        __tmp.put_f32_le(self.WindZ);
11811        __tmp.put_f32_le(self.Airspeed);
11812        __tmp.put_f32_le(self.beta);
11813        __tmp.put_f32_le(self.alpha);
11814        if matches!(version, MavlinkVersion::V2) {
11815            let len = __tmp.len();
11816            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11817        } else {
11818            __tmp.len()
11819        }
11820    }
11821}
11822#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11823#[doc = ""]
11824#[doc = "ID: 131"]
11825#[derive(Debug, Clone, PartialEq)]
11826#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11827#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11828#[cfg_attr(feature = "ts", derive(TS))]
11829#[cfg_attr(feature = "ts", ts(export))]
11830pub struct ENCAPSULATED_DATA_DATA {
11831    #[doc = "sequence number (starting with 0 on every transmission)"]
11832    pub seqnr: u16,
11833    #[doc = "image data bytes"]
11834    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11835    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11836    pub data: [u8; 253],
11837}
11838impl ENCAPSULATED_DATA_DATA {
11839    pub const ENCODED_LEN: usize = 255usize;
11840    pub const DEFAULT: Self = Self {
11841        seqnr: 0_u16,
11842        data: [0_u8; 253usize],
11843    };
11844    #[cfg(feature = "arbitrary")]
11845    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11846        use arbitrary::{Arbitrary, Unstructured};
11847        let mut buf = [0u8; 1024];
11848        rng.fill_bytes(&mut buf);
11849        let mut unstructured = Unstructured::new(&buf);
11850        Self::arbitrary(&mut unstructured).unwrap_or_default()
11851    }
11852}
11853impl Default for ENCAPSULATED_DATA_DATA {
11854    fn default() -> Self {
11855        Self::DEFAULT.clone()
11856    }
11857}
11858impl MessageData for ENCAPSULATED_DATA_DATA {
11859    type Message = MavMessage;
11860    const ID: u32 = 131u32;
11861    const NAME: &'static str = "ENCAPSULATED_DATA";
11862    const EXTRA_CRC: u8 = 223u8;
11863    const ENCODED_LEN: usize = 255usize;
11864    fn deser(
11865        _version: MavlinkVersion,
11866        __input: &[u8],
11867    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11868        let avail_len = __input.len();
11869        let mut payload_buf = [0; Self::ENCODED_LEN];
11870        let mut buf = if avail_len < Self::ENCODED_LEN {
11871            payload_buf[0..avail_len].copy_from_slice(__input);
11872            Bytes::new(&payload_buf)
11873        } else {
11874            Bytes::new(__input)
11875        };
11876        let mut __struct = Self::default();
11877        __struct.seqnr = buf.get_u16_le()?;
11878        for v in &mut __struct.data {
11879            let val = buf.get_u8()?;
11880            *v = val;
11881        }
11882        Ok(__struct)
11883    }
11884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11885        let mut __tmp = BytesMut::new(bytes);
11886        #[allow(clippy::absurd_extreme_comparisons)]
11887        #[allow(unused_comparisons)]
11888        if __tmp.remaining() < Self::ENCODED_LEN {
11889            panic!(
11890                "buffer is too small (need {} bytes, but got {})",
11891                Self::ENCODED_LEN,
11892                __tmp.remaining(),
11893            )
11894        }
11895        __tmp.put_u16_le(self.seqnr);
11896        for val in &self.data {
11897            __tmp.put_u8(*val);
11898        }
11899        if matches!(version, MavlinkVersion::V2) {
11900            let len = __tmp.len();
11901            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11902        } else {
11903            __tmp.len()
11904        }
11905    }
11906}
11907#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11908#[doc = ""]
11909#[doc = "ID: 290"]
11910#[derive(Debug, Clone, PartialEq)]
11911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11913#[cfg_attr(feature = "ts", derive(TS))]
11914#[cfg_attr(feature = "ts", ts(export))]
11915pub struct ESC_INFO_DATA {
11916    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11917    pub time_usec: u64,
11918    #[doc = "Number of reported errors by each ESC since boot."]
11919    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11920    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11921    pub error_count: [u32; 4],
11922    #[doc = "Counter of data packets received."]
11923    pub counter: u16,
11924    #[doc = "Bitmap of ESC failure flags."]
11925    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11926    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11927    pub failure_flags: [u16; 4],
11928    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11929    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11930    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11931    pub temperature: [i16; 4],
11932    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11933    pub index: u8,
11934    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11935    pub count: u8,
11936    #[doc = "Connection type protocol for all ESC."]
11937    pub connection_type: EscConnectionType,
11938    #[doc = "Information regarding online/offline status of each ESC."]
11939    pub info: u8,
11940}
11941impl ESC_INFO_DATA {
11942    pub const ENCODED_LEN: usize = 46usize;
11943    pub const DEFAULT: Self = Self {
11944        time_usec: 0_u64,
11945        error_count: [0_u32; 4usize],
11946        counter: 0_u16,
11947        failure_flags: [0_u16; 4usize],
11948        temperature: [0_i16; 4usize],
11949        index: 0_u8,
11950        count: 0_u8,
11951        connection_type: EscConnectionType::DEFAULT,
11952        info: 0_u8,
11953    };
11954    #[cfg(feature = "arbitrary")]
11955    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11956        use arbitrary::{Arbitrary, Unstructured};
11957        let mut buf = [0u8; 1024];
11958        rng.fill_bytes(&mut buf);
11959        let mut unstructured = Unstructured::new(&buf);
11960        Self::arbitrary(&mut unstructured).unwrap_or_default()
11961    }
11962}
11963impl Default for ESC_INFO_DATA {
11964    fn default() -> Self {
11965        Self::DEFAULT.clone()
11966    }
11967}
11968impl MessageData for ESC_INFO_DATA {
11969    type Message = MavMessage;
11970    const ID: u32 = 290u32;
11971    const NAME: &'static str = "ESC_INFO";
11972    const EXTRA_CRC: u8 = 251u8;
11973    const ENCODED_LEN: usize = 46usize;
11974    fn deser(
11975        _version: MavlinkVersion,
11976        __input: &[u8],
11977    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11978        let avail_len = __input.len();
11979        let mut payload_buf = [0; Self::ENCODED_LEN];
11980        let mut buf = if avail_len < Self::ENCODED_LEN {
11981            payload_buf[0..avail_len].copy_from_slice(__input);
11982            Bytes::new(&payload_buf)
11983        } else {
11984            Bytes::new(__input)
11985        };
11986        let mut __struct = Self::default();
11987        __struct.time_usec = buf.get_u64_le()?;
11988        for v in &mut __struct.error_count {
11989            let val = buf.get_u32_le()?;
11990            *v = val;
11991        }
11992        __struct.counter = buf.get_u16_le()?;
11993        for v in &mut __struct.failure_flags {
11994            let val = buf.get_u16_le()?;
11995            *v = val;
11996        }
11997        for v in &mut __struct.temperature {
11998            let val = buf.get_i16_le()?;
11999            *v = val;
12000        }
12001        __struct.index = buf.get_u8()?;
12002        __struct.count = buf.get_u8()?;
12003        let tmp = buf.get_u8()?;
12004        __struct.connection_type =
12005            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12006                enum_type: "EscConnectionType",
12007                value: tmp as u64,
12008            })?;
12009        __struct.info = buf.get_u8()?;
12010        Ok(__struct)
12011    }
12012    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12013        let mut __tmp = BytesMut::new(bytes);
12014        #[allow(clippy::absurd_extreme_comparisons)]
12015        #[allow(unused_comparisons)]
12016        if __tmp.remaining() < Self::ENCODED_LEN {
12017            panic!(
12018                "buffer is too small (need {} bytes, but got {})",
12019                Self::ENCODED_LEN,
12020                __tmp.remaining(),
12021            )
12022        }
12023        __tmp.put_u64_le(self.time_usec);
12024        for val in &self.error_count {
12025            __tmp.put_u32_le(*val);
12026        }
12027        __tmp.put_u16_le(self.counter);
12028        for val in &self.failure_flags {
12029            __tmp.put_u16_le(*val);
12030        }
12031        for val in &self.temperature {
12032            __tmp.put_i16_le(*val);
12033        }
12034        __tmp.put_u8(self.index);
12035        __tmp.put_u8(self.count);
12036        __tmp.put_u8(self.connection_type as u8);
12037        __tmp.put_u8(self.info);
12038        if matches!(version, MavlinkVersion::V2) {
12039            let len = __tmp.len();
12040            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12041        } else {
12042            __tmp.len()
12043        }
12044    }
12045}
12046#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
12047#[doc = ""]
12048#[doc = "ID: 291"]
12049#[derive(Debug, Clone, PartialEq)]
12050#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12051#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12052#[cfg_attr(feature = "ts", derive(TS))]
12053#[cfg_attr(feature = "ts", ts(export))]
12054pub struct ESC_STATUS_DATA {
12055    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
12056    pub time_usec: u64,
12057    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
12058    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12059    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12060    pub rpm: [i32; 4],
12061    #[doc = "Voltage measured from each ESC."]
12062    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12063    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12064    pub voltage: [f32; 4],
12065    #[doc = "Current measured from each ESC."]
12066    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12067    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12068    pub current: [f32; 4],
12069    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
12070    pub index: u8,
12071}
12072impl ESC_STATUS_DATA {
12073    pub const ENCODED_LEN: usize = 57usize;
12074    pub const DEFAULT: Self = Self {
12075        time_usec: 0_u64,
12076        rpm: [0_i32; 4usize],
12077        voltage: [0.0_f32; 4usize],
12078        current: [0.0_f32; 4usize],
12079        index: 0_u8,
12080    };
12081    #[cfg(feature = "arbitrary")]
12082    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12083        use arbitrary::{Arbitrary, Unstructured};
12084        let mut buf = [0u8; 1024];
12085        rng.fill_bytes(&mut buf);
12086        let mut unstructured = Unstructured::new(&buf);
12087        Self::arbitrary(&mut unstructured).unwrap_or_default()
12088    }
12089}
12090impl Default for ESC_STATUS_DATA {
12091    fn default() -> Self {
12092        Self::DEFAULT.clone()
12093    }
12094}
12095impl MessageData for ESC_STATUS_DATA {
12096    type Message = MavMessage;
12097    const ID: u32 = 291u32;
12098    const NAME: &'static str = "ESC_STATUS";
12099    const EXTRA_CRC: u8 = 10u8;
12100    const ENCODED_LEN: usize = 57usize;
12101    fn deser(
12102        _version: MavlinkVersion,
12103        __input: &[u8],
12104    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12105        let avail_len = __input.len();
12106        let mut payload_buf = [0; Self::ENCODED_LEN];
12107        let mut buf = if avail_len < Self::ENCODED_LEN {
12108            payload_buf[0..avail_len].copy_from_slice(__input);
12109            Bytes::new(&payload_buf)
12110        } else {
12111            Bytes::new(__input)
12112        };
12113        let mut __struct = Self::default();
12114        __struct.time_usec = buf.get_u64_le()?;
12115        for v in &mut __struct.rpm {
12116            let val = buf.get_i32_le()?;
12117            *v = val;
12118        }
12119        for v in &mut __struct.voltage {
12120            let val = buf.get_f32_le()?;
12121            *v = val;
12122        }
12123        for v in &mut __struct.current {
12124            let val = buf.get_f32_le()?;
12125            *v = val;
12126        }
12127        __struct.index = buf.get_u8()?;
12128        Ok(__struct)
12129    }
12130    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12131        let mut __tmp = BytesMut::new(bytes);
12132        #[allow(clippy::absurd_extreme_comparisons)]
12133        #[allow(unused_comparisons)]
12134        if __tmp.remaining() < Self::ENCODED_LEN {
12135            panic!(
12136                "buffer is too small (need {} bytes, but got {})",
12137                Self::ENCODED_LEN,
12138                __tmp.remaining(),
12139            )
12140        }
12141        __tmp.put_u64_le(self.time_usec);
12142        for val in &self.rpm {
12143            __tmp.put_i32_le(*val);
12144        }
12145        for val in &self.voltage {
12146            __tmp.put_f32_le(*val);
12147        }
12148        for val in &self.current {
12149            __tmp.put_f32_le(*val);
12150        }
12151        __tmp.put_u8(self.index);
12152        if matches!(version, MavlinkVersion::V2) {
12153            let len = __tmp.len();
12154            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12155        } else {
12156            __tmp.len()
12157        }
12158    }
12159}
12160#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
12161#[doc = ""]
12162#[doc = "ID: 230"]
12163#[derive(Debug, Clone, PartialEq)]
12164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12166#[cfg_attr(feature = "ts", derive(TS))]
12167#[cfg_attr(feature = "ts", ts(export))]
12168pub struct ESTIMATOR_STATUS_DATA {
12169    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12170    pub time_usec: u64,
12171    #[doc = "Velocity innovation test ratio"]
12172    pub vel_ratio: f32,
12173    #[doc = "Horizontal position innovation test ratio"]
12174    pub pos_horiz_ratio: f32,
12175    #[doc = "Vertical position innovation test ratio"]
12176    pub pos_vert_ratio: f32,
12177    #[doc = "Magnetometer innovation test ratio"]
12178    pub mag_ratio: f32,
12179    #[doc = "Height above terrain innovation test ratio"]
12180    pub hagl_ratio: f32,
12181    #[doc = "True airspeed innovation test ratio"]
12182    pub tas_ratio: f32,
12183    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
12184    pub pos_horiz_accuracy: f32,
12185    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
12186    pub pos_vert_accuracy: f32,
12187    #[doc = "Bitmap indicating which EKF outputs are valid."]
12188    pub flags: EstimatorStatusFlags,
12189}
12190impl ESTIMATOR_STATUS_DATA {
12191    pub const ENCODED_LEN: usize = 42usize;
12192    pub const DEFAULT: Self = Self {
12193        time_usec: 0_u64,
12194        vel_ratio: 0.0_f32,
12195        pos_horiz_ratio: 0.0_f32,
12196        pos_vert_ratio: 0.0_f32,
12197        mag_ratio: 0.0_f32,
12198        hagl_ratio: 0.0_f32,
12199        tas_ratio: 0.0_f32,
12200        pos_horiz_accuracy: 0.0_f32,
12201        pos_vert_accuracy: 0.0_f32,
12202        flags: EstimatorStatusFlags::DEFAULT,
12203    };
12204    #[cfg(feature = "arbitrary")]
12205    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12206        use arbitrary::{Arbitrary, Unstructured};
12207        let mut buf = [0u8; 1024];
12208        rng.fill_bytes(&mut buf);
12209        let mut unstructured = Unstructured::new(&buf);
12210        Self::arbitrary(&mut unstructured).unwrap_or_default()
12211    }
12212}
12213impl Default for ESTIMATOR_STATUS_DATA {
12214    fn default() -> Self {
12215        Self::DEFAULT.clone()
12216    }
12217}
12218impl MessageData for ESTIMATOR_STATUS_DATA {
12219    type Message = MavMessage;
12220    const ID: u32 = 230u32;
12221    const NAME: &'static str = "ESTIMATOR_STATUS";
12222    const EXTRA_CRC: u8 = 163u8;
12223    const ENCODED_LEN: usize = 42usize;
12224    fn deser(
12225        _version: MavlinkVersion,
12226        __input: &[u8],
12227    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12228        let avail_len = __input.len();
12229        let mut payload_buf = [0; Self::ENCODED_LEN];
12230        let mut buf = if avail_len < Self::ENCODED_LEN {
12231            payload_buf[0..avail_len].copy_from_slice(__input);
12232            Bytes::new(&payload_buf)
12233        } else {
12234            Bytes::new(__input)
12235        };
12236        let mut __struct = Self::default();
12237        __struct.time_usec = buf.get_u64_le()?;
12238        __struct.vel_ratio = buf.get_f32_le()?;
12239        __struct.pos_horiz_ratio = buf.get_f32_le()?;
12240        __struct.pos_vert_ratio = buf.get_f32_le()?;
12241        __struct.mag_ratio = buf.get_f32_le()?;
12242        __struct.hagl_ratio = buf.get_f32_le()?;
12243        __struct.tas_ratio = buf.get_f32_le()?;
12244        __struct.pos_horiz_accuracy = buf.get_f32_le()?;
12245        __struct.pos_vert_accuracy = buf.get_f32_le()?;
12246        let tmp = buf.get_u16_le()?;
12247        __struct.flags = EstimatorStatusFlags::from_bits(
12248            tmp as <EstimatorStatusFlags as Flags>::Bits,
12249        )
12250        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12251            flag_type: "EstimatorStatusFlags",
12252            value: tmp as u64,
12253        })?;
12254        Ok(__struct)
12255    }
12256    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12257        let mut __tmp = BytesMut::new(bytes);
12258        #[allow(clippy::absurd_extreme_comparisons)]
12259        #[allow(unused_comparisons)]
12260        if __tmp.remaining() < Self::ENCODED_LEN {
12261            panic!(
12262                "buffer is too small (need {} bytes, but got {})",
12263                Self::ENCODED_LEN,
12264                __tmp.remaining(),
12265            )
12266        }
12267        __tmp.put_u64_le(self.time_usec);
12268        __tmp.put_f32_le(self.vel_ratio);
12269        __tmp.put_f32_le(self.pos_horiz_ratio);
12270        __tmp.put_f32_le(self.pos_vert_ratio);
12271        __tmp.put_f32_le(self.mag_ratio);
12272        __tmp.put_f32_le(self.hagl_ratio);
12273        __tmp.put_f32_le(self.tas_ratio);
12274        __tmp.put_f32_le(self.pos_horiz_accuracy);
12275        __tmp.put_f32_le(self.pos_vert_accuracy);
12276        __tmp.put_u16_le(self.flags.bits() as u16);
12277        if matches!(version, MavlinkVersion::V2) {
12278            let len = __tmp.len();
12279            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12280        } else {
12281            __tmp.len()
12282        }
12283    }
12284}
12285#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
12286#[doc = ""]
12287#[doc = "ID: 410"]
12288#[derive(Debug, Clone, PartialEq)]
12289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12291#[cfg_attr(feature = "ts", derive(TS))]
12292#[cfg_attr(feature = "ts", ts(export))]
12293pub struct EVENT_DATA {
12294    #[doc = "Event ID (as defined in the component metadata)"]
12295    pub id: u32,
12296    #[doc = "Timestamp (time since system boot when the event happened)."]
12297    pub event_time_boot_ms: u32,
12298    #[doc = "Sequence number."]
12299    pub sequence: u16,
12300    #[doc = "Component ID"]
12301    pub destination_component: u8,
12302    #[doc = "System ID"]
12303    pub destination_system: u8,
12304    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
12305    pub log_levels: u8,
12306    #[doc = "Arguments (depend on event ID)."]
12307    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12308    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12309    pub arguments: [u8; 40],
12310}
12311impl EVENT_DATA {
12312    pub const ENCODED_LEN: usize = 53usize;
12313    pub const DEFAULT: Self = Self {
12314        id: 0_u32,
12315        event_time_boot_ms: 0_u32,
12316        sequence: 0_u16,
12317        destination_component: 0_u8,
12318        destination_system: 0_u8,
12319        log_levels: 0_u8,
12320        arguments: [0_u8; 40usize],
12321    };
12322    #[cfg(feature = "arbitrary")]
12323    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12324        use arbitrary::{Arbitrary, Unstructured};
12325        let mut buf = [0u8; 1024];
12326        rng.fill_bytes(&mut buf);
12327        let mut unstructured = Unstructured::new(&buf);
12328        Self::arbitrary(&mut unstructured).unwrap_or_default()
12329    }
12330}
12331impl Default for EVENT_DATA {
12332    fn default() -> Self {
12333        Self::DEFAULT.clone()
12334    }
12335}
12336impl MessageData for EVENT_DATA {
12337    type Message = MavMessage;
12338    const ID: u32 = 410u32;
12339    const NAME: &'static str = "EVENT";
12340    const EXTRA_CRC: u8 = 160u8;
12341    const ENCODED_LEN: usize = 53usize;
12342    fn deser(
12343        _version: MavlinkVersion,
12344        __input: &[u8],
12345    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12346        let avail_len = __input.len();
12347        let mut payload_buf = [0; Self::ENCODED_LEN];
12348        let mut buf = if avail_len < Self::ENCODED_LEN {
12349            payload_buf[0..avail_len].copy_from_slice(__input);
12350            Bytes::new(&payload_buf)
12351        } else {
12352            Bytes::new(__input)
12353        };
12354        let mut __struct = Self::default();
12355        __struct.id = buf.get_u32_le()?;
12356        __struct.event_time_boot_ms = buf.get_u32_le()?;
12357        __struct.sequence = buf.get_u16_le()?;
12358        __struct.destination_component = buf.get_u8()?;
12359        __struct.destination_system = buf.get_u8()?;
12360        __struct.log_levels = buf.get_u8()?;
12361        for v in &mut __struct.arguments {
12362            let val = buf.get_u8()?;
12363            *v = val;
12364        }
12365        Ok(__struct)
12366    }
12367    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12368        let mut __tmp = BytesMut::new(bytes);
12369        #[allow(clippy::absurd_extreme_comparisons)]
12370        #[allow(unused_comparisons)]
12371        if __tmp.remaining() < Self::ENCODED_LEN {
12372            panic!(
12373                "buffer is too small (need {} bytes, but got {})",
12374                Self::ENCODED_LEN,
12375                __tmp.remaining(),
12376            )
12377        }
12378        __tmp.put_u32_le(self.id);
12379        __tmp.put_u32_le(self.event_time_boot_ms);
12380        __tmp.put_u16_le(self.sequence);
12381        __tmp.put_u8(self.destination_component);
12382        __tmp.put_u8(self.destination_system);
12383        __tmp.put_u8(self.log_levels);
12384        for val in &self.arguments {
12385            __tmp.put_u8(*val);
12386        }
12387        if matches!(version, MavlinkVersion::V2) {
12388            let len = __tmp.len();
12389            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12390        } else {
12391            __tmp.len()
12392        }
12393    }
12394}
12395#[doc = "Provides state for additional features."]
12396#[doc = ""]
12397#[doc = "ID: 245"]
12398#[derive(Debug, Clone, PartialEq)]
12399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12400#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12401#[cfg_attr(feature = "ts", derive(TS))]
12402#[cfg_attr(feature = "ts", ts(export))]
12403pub struct EXTENDED_SYS_STATE_DATA {
12404    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
12405    pub vtol_state: MavVtolState,
12406    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
12407    pub landed_state: MavLandedState,
12408}
12409impl EXTENDED_SYS_STATE_DATA {
12410    pub const ENCODED_LEN: usize = 2usize;
12411    pub const DEFAULT: Self = Self {
12412        vtol_state: MavVtolState::DEFAULT,
12413        landed_state: MavLandedState::DEFAULT,
12414    };
12415    #[cfg(feature = "arbitrary")]
12416    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12417        use arbitrary::{Arbitrary, Unstructured};
12418        let mut buf = [0u8; 1024];
12419        rng.fill_bytes(&mut buf);
12420        let mut unstructured = Unstructured::new(&buf);
12421        Self::arbitrary(&mut unstructured).unwrap_or_default()
12422    }
12423}
12424impl Default for EXTENDED_SYS_STATE_DATA {
12425    fn default() -> Self {
12426        Self::DEFAULT.clone()
12427    }
12428}
12429impl MessageData for EXTENDED_SYS_STATE_DATA {
12430    type Message = MavMessage;
12431    const ID: u32 = 245u32;
12432    const NAME: &'static str = "EXTENDED_SYS_STATE";
12433    const EXTRA_CRC: u8 = 130u8;
12434    const ENCODED_LEN: usize = 2usize;
12435    fn deser(
12436        _version: MavlinkVersion,
12437        __input: &[u8],
12438    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12439        let avail_len = __input.len();
12440        let mut payload_buf = [0; Self::ENCODED_LEN];
12441        let mut buf = if avail_len < Self::ENCODED_LEN {
12442            payload_buf[0..avail_len].copy_from_slice(__input);
12443            Bytes::new(&payload_buf)
12444        } else {
12445            Bytes::new(__input)
12446        };
12447        let mut __struct = Self::default();
12448        let tmp = buf.get_u8()?;
12449        __struct.vtol_state =
12450            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12451                enum_type: "MavVtolState",
12452                value: tmp as u64,
12453            })?;
12454        let tmp = buf.get_u8()?;
12455        __struct.landed_state =
12456            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12457                enum_type: "MavLandedState",
12458                value: tmp as u64,
12459            })?;
12460        Ok(__struct)
12461    }
12462    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12463        let mut __tmp = BytesMut::new(bytes);
12464        #[allow(clippy::absurd_extreme_comparisons)]
12465        #[allow(unused_comparisons)]
12466        if __tmp.remaining() < Self::ENCODED_LEN {
12467            panic!(
12468                "buffer is too small (need {} bytes, but got {})",
12469                Self::ENCODED_LEN,
12470                __tmp.remaining(),
12471            )
12472        }
12473        __tmp.put_u8(self.vtol_state as u8);
12474        __tmp.put_u8(self.landed_state as u8);
12475        if matches!(version, MavlinkVersion::V2) {
12476            let len = __tmp.len();
12477            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12478        } else {
12479            __tmp.len()
12480        }
12481    }
12482}
12483#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
12484#[doc = ""]
12485#[doc = "ID: 162"]
12486#[derive(Debug, Clone, PartialEq)]
12487#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12489#[cfg_attr(feature = "ts", derive(TS))]
12490#[cfg_attr(feature = "ts", ts(export))]
12491pub struct FENCE_STATUS_DATA {
12492    #[doc = "Time (since boot) of last breach."]
12493    pub breach_time: u32,
12494    #[doc = "Number of fence breaches."]
12495    pub breach_count: u16,
12496    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
12497    pub breach_status: u8,
12498    #[doc = "Last breach type."]
12499    pub breach_type: FenceBreach,
12500    #[doc = "Active action to prevent fence breach"]
12501    #[cfg_attr(feature = "serde", serde(default))]
12502    pub breach_mitigation: FenceMitigate,
12503}
12504impl FENCE_STATUS_DATA {
12505    pub const ENCODED_LEN: usize = 9usize;
12506    pub const DEFAULT: Self = Self {
12507        breach_time: 0_u32,
12508        breach_count: 0_u16,
12509        breach_status: 0_u8,
12510        breach_type: FenceBreach::DEFAULT,
12511        breach_mitigation: FenceMitigate::DEFAULT,
12512    };
12513    #[cfg(feature = "arbitrary")]
12514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12515        use arbitrary::{Arbitrary, Unstructured};
12516        let mut buf = [0u8; 1024];
12517        rng.fill_bytes(&mut buf);
12518        let mut unstructured = Unstructured::new(&buf);
12519        Self::arbitrary(&mut unstructured).unwrap_or_default()
12520    }
12521}
12522impl Default for FENCE_STATUS_DATA {
12523    fn default() -> Self {
12524        Self::DEFAULT.clone()
12525    }
12526}
12527impl MessageData for FENCE_STATUS_DATA {
12528    type Message = MavMessage;
12529    const ID: u32 = 162u32;
12530    const NAME: &'static str = "FENCE_STATUS";
12531    const EXTRA_CRC: u8 = 189u8;
12532    const ENCODED_LEN: usize = 9usize;
12533    fn deser(
12534        _version: MavlinkVersion,
12535        __input: &[u8],
12536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12537        let avail_len = __input.len();
12538        let mut payload_buf = [0; Self::ENCODED_LEN];
12539        let mut buf = if avail_len < Self::ENCODED_LEN {
12540            payload_buf[0..avail_len].copy_from_slice(__input);
12541            Bytes::new(&payload_buf)
12542        } else {
12543            Bytes::new(__input)
12544        };
12545        let mut __struct = Self::default();
12546        __struct.breach_time = buf.get_u32_le()?;
12547        __struct.breach_count = buf.get_u16_le()?;
12548        __struct.breach_status = buf.get_u8()?;
12549        let tmp = buf.get_u8()?;
12550        __struct.breach_type =
12551            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12552                enum_type: "FenceBreach",
12553                value: tmp as u64,
12554            })?;
12555        let tmp = buf.get_u8()?;
12556        __struct.breach_mitigation =
12557            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12558                enum_type: "FenceMitigate",
12559                value: tmp as u64,
12560            })?;
12561        Ok(__struct)
12562    }
12563    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12564        let mut __tmp = BytesMut::new(bytes);
12565        #[allow(clippy::absurd_extreme_comparisons)]
12566        #[allow(unused_comparisons)]
12567        if __tmp.remaining() < Self::ENCODED_LEN {
12568            panic!(
12569                "buffer is too small (need {} bytes, but got {})",
12570                Self::ENCODED_LEN,
12571                __tmp.remaining(),
12572            )
12573        }
12574        __tmp.put_u32_le(self.breach_time);
12575        __tmp.put_u16_le(self.breach_count);
12576        __tmp.put_u8(self.breach_status);
12577        __tmp.put_u8(self.breach_type as u8);
12578        if matches!(version, MavlinkVersion::V2) {
12579            __tmp.put_u8(self.breach_mitigation as u8);
12580            let len = __tmp.len();
12581            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12582        } else {
12583            __tmp.len()
12584        }
12585    }
12586}
12587#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
12588#[doc = ""]
12589#[doc = "ID: 110"]
12590#[derive(Debug, Clone, PartialEq)]
12591#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12593#[cfg_attr(feature = "ts", derive(TS))]
12594#[cfg_attr(feature = "ts", ts(export))]
12595pub struct FILE_TRANSFER_PROTOCOL_DATA {
12596    #[doc = "Network ID (0 for broadcast)"]
12597    pub target_network: u8,
12598    #[doc = "System ID (0 for broadcast)"]
12599    pub target_system: u8,
12600    #[doc = "Component ID (0 for broadcast)"]
12601    pub target_component: u8,
12602    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
12603    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12604    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12605    pub payload: [u8; 251],
12606}
12607impl FILE_TRANSFER_PROTOCOL_DATA {
12608    pub const ENCODED_LEN: usize = 254usize;
12609    pub const DEFAULT: Self = Self {
12610        target_network: 0_u8,
12611        target_system: 0_u8,
12612        target_component: 0_u8,
12613        payload: [0_u8; 251usize],
12614    };
12615    #[cfg(feature = "arbitrary")]
12616    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12617        use arbitrary::{Arbitrary, Unstructured};
12618        let mut buf = [0u8; 1024];
12619        rng.fill_bytes(&mut buf);
12620        let mut unstructured = Unstructured::new(&buf);
12621        Self::arbitrary(&mut unstructured).unwrap_or_default()
12622    }
12623}
12624impl Default for FILE_TRANSFER_PROTOCOL_DATA {
12625    fn default() -> Self {
12626        Self::DEFAULT.clone()
12627    }
12628}
12629impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
12630    type Message = MavMessage;
12631    const ID: u32 = 110u32;
12632    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
12633    const EXTRA_CRC: u8 = 84u8;
12634    const ENCODED_LEN: usize = 254usize;
12635    fn deser(
12636        _version: MavlinkVersion,
12637        __input: &[u8],
12638    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12639        let avail_len = __input.len();
12640        let mut payload_buf = [0; Self::ENCODED_LEN];
12641        let mut buf = if avail_len < Self::ENCODED_LEN {
12642            payload_buf[0..avail_len].copy_from_slice(__input);
12643            Bytes::new(&payload_buf)
12644        } else {
12645            Bytes::new(__input)
12646        };
12647        let mut __struct = Self::default();
12648        __struct.target_network = buf.get_u8()?;
12649        __struct.target_system = buf.get_u8()?;
12650        __struct.target_component = buf.get_u8()?;
12651        for v in &mut __struct.payload {
12652            let val = buf.get_u8()?;
12653            *v = val;
12654        }
12655        Ok(__struct)
12656    }
12657    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12658        let mut __tmp = BytesMut::new(bytes);
12659        #[allow(clippy::absurd_extreme_comparisons)]
12660        #[allow(unused_comparisons)]
12661        if __tmp.remaining() < Self::ENCODED_LEN {
12662            panic!(
12663                "buffer is too small (need {} bytes, but got {})",
12664                Self::ENCODED_LEN,
12665                __tmp.remaining(),
12666            )
12667        }
12668        __tmp.put_u8(self.target_network);
12669        __tmp.put_u8(self.target_system);
12670        __tmp.put_u8(self.target_component);
12671        for val in &self.payload {
12672            __tmp.put_u8(*val);
12673        }
12674        if matches!(version, MavlinkVersion::V2) {
12675            let len = __tmp.len();
12676            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12677        } else {
12678            __tmp.len()
12679        }
12680    }
12681}
12682#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12683#[doc = ""]
12684#[doc = "ID: 264"]
12685#[derive(Debug, Clone, PartialEq)]
12686#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12687#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12688#[cfg_attr(feature = "ts", derive(TS))]
12689#[cfg_attr(feature = "ts", ts(export))]
12690pub struct FLIGHT_INFORMATION_DATA {
12691    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12692    pub arming_time_utc: u64,
12693    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12694    pub takeoff_time_utc: u64,
12695    #[doc = "Flight number. Note, field is misnamed UUID."]
12696    pub flight_uuid: u64,
12697    #[doc = "Timestamp (time since system boot)."]
12698    pub time_boot_ms: u32,
12699    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12700    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12701    pub landing_time: u32,
12702}
12703impl FLIGHT_INFORMATION_DATA {
12704    pub const ENCODED_LEN: usize = 32usize;
12705    pub const DEFAULT: Self = Self {
12706        arming_time_utc: 0_u64,
12707        takeoff_time_utc: 0_u64,
12708        flight_uuid: 0_u64,
12709        time_boot_ms: 0_u32,
12710        landing_time: 0_u32,
12711    };
12712    #[cfg(feature = "arbitrary")]
12713    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12714        use arbitrary::{Arbitrary, Unstructured};
12715        let mut buf = [0u8; 1024];
12716        rng.fill_bytes(&mut buf);
12717        let mut unstructured = Unstructured::new(&buf);
12718        Self::arbitrary(&mut unstructured).unwrap_or_default()
12719    }
12720}
12721impl Default for FLIGHT_INFORMATION_DATA {
12722    fn default() -> Self {
12723        Self::DEFAULT.clone()
12724    }
12725}
12726impl MessageData for FLIGHT_INFORMATION_DATA {
12727    type Message = MavMessage;
12728    const ID: u32 = 264u32;
12729    const NAME: &'static str = "FLIGHT_INFORMATION";
12730    const EXTRA_CRC: u8 = 49u8;
12731    const ENCODED_LEN: usize = 32usize;
12732    fn deser(
12733        _version: MavlinkVersion,
12734        __input: &[u8],
12735    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12736        let avail_len = __input.len();
12737        let mut payload_buf = [0; Self::ENCODED_LEN];
12738        let mut buf = if avail_len < Self::ENCODED_LEN {
12739            payload_buf[0..avail_len].copy_from_slice(__input);
12740            Bytes::new(&payload_buf)
12741        } else {
12742            Bytes::new(__input)
12743        };
12744        let mut __struct = Self::default();
12745        __struct.arming_time_utc = buf.get_u64_le()?;
12746        __struct.takeoff_time_utc = buf.get_u64_le()?;
12747        __struct.flight_uuid = buf.get_u64_le()?;
12748        __struct.time_boot_ms = buf.get_u32_le()?;
12749        __struct.landing_time = buf.get_u32_le()?;
12750        Ok(__struct)
12751    }
12752    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12753        let mut __tmp = BytesMut::new(bytes);
12754        #[allow(clippy::absurd_extreme_comparisons)]
12755        #[allow(unused_comparisons)]
12756        if __tmp.remaining() < Self::ENCODED_LEN {
12757            panic!(
12758                "buffer is too small (need {} bytes, but got {})",
12759                Self::ENCODED_LEN,
12760                __tmp.remaining(),
12761            )
12762        }
12763        __tmp.put_u64_le(self.arming_time_utc);
12764        __tmp.put_u64_le(self.takeoff_time_utc);
12765        __tmp.put_u64_le(self.flight_uuid);
12766        __tmp.put_u32_le(self.time_boot_ms);
12767        if matches!(version, MavlinkVersion::V2) {
12768            __tmp.put_u32_le(self.landing_time);
12769            let len = __tmp.len();
12770            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12771        } else {
12772            __tmp.len()
12773        }
12774    }
12775}
12776#[doc = "Current motion information from a designated system."]
12777#[doc = ""]
12778#[doc = "ID: 144"]
12779#[derive(Debug, Clone, PartialEq)]
12780#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12782#[cfg_attr(feature = "ts", derive(TS))]
12783#[cfg_attr(feature = "ts", ts(export))]
12784pub struct FOLLOW_TARGET_DATA {
12785    #[doc = "Timestamp (time since system boot)."]
12786    pub timestamp: u64,
12787    #[doc = "button states or switches of a tracker device"]
12788    pub custom_state: u64,
12789    #[doc = "Latitude (WGS84)"]
12790    pub lat: i32,
12791    #[doc = "Longitude (WGS84)"]
12792    pub lon: i32,
12793    #[doc = "Altitude (MSL)"]
12794    pub alt: f32,
12795    #[doc = "target velocity (0,0,0) for unknown"]
12796    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12797    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12798    pub vel: [f32; 3],
12799    #[doc = "linear target acceleration (0,0,0) for unknown"]
12800    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12801    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12802    pub acc: [f32; 3],
12803    #[doc = "(0 0 0 0 for unknown)"]
12804    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12805    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12806    pub attitude_q: [f32; 4],
12807    #[doc = "(0 0 0 for unknown)"]
12808    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12809    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12810    pub rates: [f32; 3],
12811    #[doc = "eph epv"]
12812    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12813    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12814    pub position_cov: [f32; 3],
12815    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12816    pub est_capabilities: u8,
12817}
12818impl FOLLOW_TARGET_DATA {
12819    pub const ENCODED_LEN: usize = 93usize;
12820    pub const DEFAULT: Self = Self {
12821        timestamp: 0_u64,
12822        custom_state: 0_u64,
12823        lat: 0_i32,
12824        lon: 0_i32,
12825        alt: 0.0_f32,
12826        vel: [0.0_f32; 3usize],
12827        acc: [0.0_f32; 3usize],
12828        attitude_q: [0.0_f32; 4usize],
12829        rates: [0.0_f32; 3usize],
12830        position_cov: [0.0_f32; 3usize],
12831        est_capabilities: 0_u8,
12832    };
12833    #[cfg(feature = "arbitrary")]
12834    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12835        use arbitrary::{Arbitrary, Unstructured};
12836        let mut buf = [0u8; 1024];
12837        rng.fill_bytes(&mut buf);
12838        let mut unstructured = Unstructured::new(&buf);
12839        Self::arbitrary(&mut unstructured).unwrap_or_default()
12840    }
12841}
12842impl Default for FOLLOW_TARGET_DATA {
12843    fn default() -> Self {
12844        Self::DEFAULT.clone()
12845    }
12846}
12847impl MessageData for FOLLOW_TARGET_DATA {
12848    type Message = MavMessage;
12849    const ID: u32 = 144u32;
12850    const NAME: &'static str = "FOLLOW_TARGET";
12851    const EXTRA_CRC: u8 = 127u8;
12852    const ENCODED_LEN: usize = 93usize;
12853    fn deser(
12854        _version: MavlinkVersion,
12855        __input: &[u8],
12856    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12857        let avail_len = __input.len();
12858        let mut payload_buf = [0; Self::ENCODED_LEN];
12859        let mut buf = if avail_len < Self::ENCODED_LEN {
12860            payload_buf[0..avail_len].copy_from_slice(__input);
12861            Bytes::new(&payload_buf)
12862        } else {
12863            Bytes::new(__input)
12864        };
12865        let mut __struct = Self::default();
12866        __struct.timestamp = buf.get_u64_le()?;
12867        __struct.custom_state = buf.get_u64_le()?;
12868        __struct.lat = buf.get_i32_le()?;
12869        __struct.lon = buf.get_i32_le()?;
12870        __struct.alt = buf.get_f32_le()?;
12871        for v in &mut __struct.vel {
12872            let val = buf.get_f32_le()?;
12873            *v = val;
12874        }
12875        for v in &mut __struct.acc {
12876            let val = buf.get_f32_le()?;
12877            *v = val;
12878        }
12879        for v in &mut __struct.attitude_q {
12880            let val = buf.get_f32_le()?;
12881            *v = val;
12882        }
12883        for v in &mut __struct.rates {
12884            let val = buf.get_f32_le()?;
12885            *v = val;
12886        }
12887        for v in &mut __struct.position_cov {
12888            let val = buf.get_f32_le()?;
12889            *v = val;
12890        }
12891        __struct.est_capabilities = buf.get_u8()?;
12892        Ok(__struct)
12893    }
12894    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12895        let mut __tmp = BytesMut::new(bytes);
12896        #[allow(clippy::absurd_extreme_comparisons)]
12897        #[allow(unused_comparisons)]
12898        if __tmp.remaining() < Self::ENCODED_LEN {
12899            panic!(
12900                "buffer is too small (need {} bytes, but got {})",
12901                Self::ENCODED_LEN,
12902                __tmp.remaining(),
12903            )
12904        }
12905        __tmp.put_u64_le(self.timestamp);
12906        __tmp.put_u64_le(self.custom_state);
12907        __tmp.put_i32_le(self.lat);
12908        __tmp.put_i32_le(self.lon);
12909        __tmp.put_f32_le(self.alt);
12910        for val in &self.vel {
12911            __tmp.put_f32_le(*val);
12912        }
12913        for val in &self.acc {
12914            __tmp.put_f32_le(*val);
12915        }
12916        for val in &self.attitude_q {
12917            __tmp.put_f32_le(*val);
12918        }
12919        for val in &self.rates {
12920            __tmp.put_f32_le(*val);
12921        }
12922        for val in &self.position_cov {
12923            __tmp.put_f32_le(*val);
12924        }
12925        __tmp.put_u8(self.est_capabilities);
12926        if matches!(version, MavlinkVersion::V2) {
12927            let len = __tmp.len();
12928            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12929        } else {
12930            __tmp.len()
12931        }
12932    }
12933}
12934#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12935#[doc = ""]
12936#[doc = "ID: 371"]
12937#[derive(Debug, Clone, PartialEq)]
12938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12940#[cfg_attr(feature = "ts", derive(TS))]
12941#[cfg_attr(feature = "ts", ts(export))]
12942pub struct FUEL_STATUS_DATA {
12943    #[doc = "Capacity when full. Must be provided."]
12944    pub maximum_fuel: f32,
12945    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12946    pub consumed_fuel: f32,
12947    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12948    pub remaining_fuel: f32,
12949    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12950    pub flow_rate: f32,
12951    #[doc = "Fuel temperature. NaN: field not provided."]
12952    pub temperature: f32,
12953    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12954    pub fuel_type: MavFuelType,
12955    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12956    pub id: u8,
12957    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12958    pub percent_remaining: u8,
12959}
12960impl FUEL_STATUS_DATA {
12961    pub const ENCODED_LEN: usize = 26usize;
12962    pub const DEFAULT: Self = Self {
12963        maximum_fuel: 0.0_f32,
12964        consumed_fuel: 0.0_f32,
12965        remaining_fuel: 0.0_f32,
12966        flow_rate: 0.0_f32,
12967        temperature: 0.0_f32,
12968        fuel_type: MavFuelType::DEFAULT,
12969        id: 0_u8,
12970        percent_remaining: 0_u8,
12971    };
12972    #[cfg(feature = "arbitrary")]
12973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12974        use arbitrary::{Arbitrary, Unstructured};
12975        let mut buf = [0u8; 1024];
12976        rng.fill_bytes(&mut buf);
12977        let mut unstructured = Unstructured::new(&buf);
12978        Self::arbitrary(&mut unstructured).unwrap_or_default()
12979    }
12980}
12981impl Default for FUEL_STATUS_DATA {
12982    fn default() -> Self {
12983        Self::DEFAULT.clone()
12984    }
12985}
12986impl MessageData for FUEL_STATUS_DATA {
12987    type Message = MavMessage;
12988    const ID: u32 = 371u32;
12989    const NAME: &'static str = "FUEL_STATUS";
12990    const EXTRA_CRC: u8 = 10u8;
12991    const ENCODED_LEN: usize = 26usize;
12992    fn deser(
12993        _version: MavlinkVersion,
12994        __input: &[u8],
12995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12996        let avail_len = __input.len();
12997        let mut payload_buf = [0; Self::ENCODED_LEN];
12998        let mut buf = if avail_len < Self::ENCODED_LEN {
12999            payload_buf[0..avail_len].copy_from_slice(__input);
13000            Bytes::new(&payload_buf)
13001        } else {
13002            Bytes::new(__input)
13003        };
13004        let mut __struct = Self::default();
13005        __struct.maximum_fuel = buf.get_f32_le()?;
13006        __struct.consumed_fuel = buf.get_f32_le()?;
13007        __struct.remaining_fuel = buf.get_f32_le()?;
13008        __struct.flow_rate = buf.get_f32_le()?;
13009        __struct.temperature = buf.get_f32_le()?;
13010        let tmp = buf.get_u32_le()?;
13011        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
13012            ::mavlink_core::error::ParserError::InvalidEnum {
13013                enum_type: "MavFuelType",
13014                value: tmp as u64,
13015            },
13016        )?;
13017        __struct.id = buf.get_u8()?;
13018        __struct.percent_remaining = buf.get_u8()?;
13019        Ok(__struct)
13020    }
13021    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13022        let mut __tmp = BytesMut::new(bytes);
13023        #[allow(clippy::absurd_extreme_comparisons)]
13024        #[allow(unused_comparisons)]
13025        if __tmp.remaining() < Self::ENCODED_LEN {
13026            panic!(
13027                "buffer is too small (need {} bytes, but got {})",
13028                Self::ENCODED_LEN,
13029                __tmp.remaining(),
13030            )
13031        }
13032        __tmp.put_f32_le(self.maximum_fuel);
13033        __tmp.put_f32_le(self.consumed_fuel);
13034        __tmp.put_f32_le(self.remaining_fuel);
13035        __tmp.put_f32_le(self.flow_rate);
13036        __tmp.put_f32_le(self.temperature);
13037        __tmp.put_u32_le(self.fuel_type as u32);
13038        __tmp.put_u8(self.id);
13039        __tmp.put_u8(self.percent_remaining);
13040        if matches!(version, MavlinkVersion::V2) {
13041            let len = __tmp.len();
13042            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13043        } else {
13044            __tmp.len()
13045        }
13046    }
13047}
13048#[doc = "Fixed-wing soaring (i.e. thermal seeking) data."]
13049#[doc = ""]
13050#[doc = "ID: 8011"]
13051#[derive(Debug, Clone, PartialEq)]
13052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13054#[cfg_attr(feature = "ts", derive(TS))]
13055#[cfg_attr(feature = "ts", ts(export))]
13056pub struct FW_SOARING_DATA_DATA {
13057    #[doc = "Timestamp"]
13058    pub timestamp: u64,
13059    #[doc = "Timestamp since last mode change"]
13060    pub timestampModeChanged: u64,
13061    #[doc = "Thermal core updraft strength"]
13062    pub xW: f32,
13063    #[doc = "Thermal radius"]
13064    pub xR: f32,
13065    #[doc = "Thermal center latitude"]
13066    pub xLat: f32,
13067    #[doc = "Thermal center longitude"]
13068    pub xLon: f32,
13069    #[doc = "Variance W"]
13070    pub VarW: f32,
13071    #[doc = "Variance R"]
13072    pub VarR: f32,
13073    #[doc = "Variance Lat"]
13074    pub VarLat: f32,
13075    #[doc = "Variance Lon"]
13076    pub VarLon: f32,
13077    #[doc = "Suggested loiter radius"]
13078    pub LoiterRadius: f32,
13079    #[doc = "Suggested loiter direction"]
13080    pub LoiterDirection: f32,
13081    #[doc = "Distance to soar point"]
13082    pub DistToSoarPoint: f32,
13083    #[doc = "Expected sink rate at current airspeed, roll and throttle"]
13084    pub vSinkExp: f32,
13085    #[doc = "Measurement / updraft speed at current/local airplane position"]
13086    pub z1_LocalUpdraftSpeed: f32,
13087    #[doc = "Measurement / roll angle tracking error"]
13088    pub z2_DeltaRoll: f32,
13089    #[doc = "Expected measurement 1"]
13090    pub z1_exp: f32,
13091    #[doc = "Expected measurement 2"]
13092    pub z2_exp: f32,
13093    #[doc = "Thermal drift (from estimator prediction step only)"]
13094    pub ThermalGSNorth: f32,
13095    #[doc = "Thermal drift (from estimator prediction step only)"]
13096    pub ThermalGSEast: f32,
13097    #[doc = "Total specific energy change (filtered)"]
13098    pub TSE_dot: f32,
13099    #[doc = "Debug variable 1"]
13100    pub DebugVar1: f32,
13101    #[doc = "Debug variable 2"]
13102    pub DebugVar2: f32,
13103    #[doc = "Control Mode [-]"]
13104    pub ControlMode: u8,
13105    #[doc = "Data valid [-]"]
13106    pub valid: u8,
13107}
13108impl FW_SOARING_DATA_DATA {
13109    pub const ENCODED_LEN: usize = 102usize;
13110    pub const DEFAULT: Self = Self {
13111        timestamp: 0_u64,
13112        timestampModeChanged: 0_u64,
13113        xW: 0.0_f32,
13114        xR: 0.0_f32,
13115        xLat: 0.0_f32,
13116        xLon: 0.0_f32,
13117        VarW: 0.0_f32,
13118        VarR: 0.0_f32,
13119        VarLat: 0.0_f32,
13120        VarLon: 0.0_f32,
13121        LoiterRadius: 0.0_f32,
13122        LoiterDirection: 0.0_f32,
13123        DistToSoarPoint: 0.0_f32,
13124        vSinkExp: 0.0_f32,
13125        z1_LocalUpdraftSpeed: 0.0_f32,
13126        z2_DeltaRoll: 0.0_f32,
13127        z1_exp: 0.0_f32,
13128        z2_exp: 0.0_f32,
13129        ThermalGSNorth: 0.0_f32,
13130        ThermalGSEast: 0.0_f32,
13131        TSE_dot: 0.0_f32,
13132        DebugVar1: 0.0_f32,
13133        DebugVar2: 0.0_f32,
13134        ControlMode: 0_u8,
13135        valid: 0_u8,
13136    };
13137    #[cfg(feature = "arbitrary")]
13138    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13139        use arbitrary::{Arbitrary, Unstructured};
13140        let mut buf = [0u8; 1024];
13141        rng.fill_bytes(&mut buf);
13142        let mut unstructured = Unstructured::new(&buf);
13143        Self::arbitrary(&mut unstructured).unwrap_or_default()
13144    }
13145}
13146impl Default for FW_SOARING_DATA_DATA {
13147    fn default() -> Self {
13148        Self::DEFAULT.clone()
13149    }
13150}
13151impl MessageData for FW_SOARING_DATA_DATA {
13152    type Message = MavMessage;
13153    const ID: u32 = 8011u32;
13154    const NAME: &'static str = "FW_SOARING_DATA";
13155    const EXTRA_CRC: u8 = 20u8;
13156    const ENCODED_LEN: usize = 102usize;
13157    fn deser(
13158        _version: MavlinkVersion,
13159        __input: &[u8],
13160    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13161        let avail_len = __input.len();
13162        let mut payload_buf = [0; Self::ENCODED_LEN];
13163        let mut buf = if avail_len < Self::ENCODED_LEN {
13164            payload_buf[0..avail_len].copy_from_slice(__input);
13165            Bytes::new(&payload_buf)
13166        } else {
13167            Bytes::new(__input)
13168        };
13169        let mut __struct = Self::default();
13170        __struct.timestamp = buf.get_u64_le()?;
13171        __struct.timestampModeChanged = buf.get_u64_le()?;
13172        __struct.xW = buf.get_f32_le()?;
13173        __struct.xR = buf.get_f32_le()?;
13174        __struct.xLat = buf.get_f32_le()?;
13175        __struct.xLon = buf.get_f32_le()?;
13176        __struct.VarW = buf.get_f32_le()?;
13177        __struct.VarR = buf.get_f32_le()?;
13178        __struct.VarLat = buf.get_f32_le()?;
13179        __struct.VarLon = buf.get_f32_le()?;
13180        __struct.LoiterRadius = buf.get_f32_le()?;
13181        __struct.LoiterDirection = buf.get_f32_le()?;
13182        __struct.DistToSoarPoint = buf.get_f32_le()?;
13183        __struct.vSinkExp = buf.get_f32_le()?;
13184        __struct.z1_LocalUpdraftSpeed = buf.get_f32_le()?;
13185        __struct.z2_DeltaRoll = buf.get_f32_le()?;
13186        __struct.z1_exp = buf.get_f32_le()?;
13187        __struct.z2_exp = buf.get_f32_le()?;
13188        __struct.ThermalGSNorth = buf.get_f32_le()?;
13189        __struct.ThermalGSEast = buf.get_f32_le()?;
13190        __struct.TSE_dot = buf.get_f32_le()?;
13191        __struct.DebugVar1 = buf.get_f32_le()?;
13192        __struct.DebugVar2 = buf.get_f32_le()?;
13193        __struct.ControlMode = buf.get_u8()?;
13194        __struct.valid = buf.get_u8()?;
13195        Ok(__struct)
13196    }
13197    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13198        let mut __tmp = BytesMut::new(bytes);
13199        #[allow(clippy::absurd_extreme_comparisons)]
13200        #[allow(unused_comparisons)]
13201        if __tmp.remaining() < Self::ENCODED_LEN {
13202            panic!(
13203                "buffer is too small (need {} bytes, but got {})",
13204                Self::ENCODED_LEN,
13205                __tmp.remaining(),
13206            )
13207        }
13208        __tmp.put_u64_le(self.timestamp);
13209        __tmp.put_u64_le(self.timestampModeChanged);
13210        __tmp.put_f32_le(self.xW);
13211        __tmp.put_f32_le(self.xR);
13212        __tmp.put_f32_le(self.xLat);
13213        __tmp.put_f32_le(self.xLon);
13214        __tmp.put_f32_le(self.VarW);
13215        __tmp.put_f32_le(self.VarR);
13216        __tmp.put_f32_le(self.VarLat);
13217        __tmp.put_f32_le(self.VarLon);
13218        __tmp.put_f32_le(self.LoiterRadius);
13219        __tmp.put_f32_le(self.LoiterDirection);
13220        __tmp.put_f32_le(self.DistToSoarPoint);
13221        __tmp.put_f32_le(self.vSinkExp);
13222        __tmp.put_f32_le(self.z1_LocalUpdraftSpeed);
13223        __tmp.put_f32_le(self.z2_DeltaRoll);
13224        __tmp.put_f32_le(self.z1_exp);
13225        __tmp.put_f32_le(self.z2_exp);
13226        __tmp.put_f32_le(self.ThermalGSNorth);
13227        __tmp.put_f32_le(self.ThermalGSEast);
13228        __tmp.put_f32_le(self.TSE_dot);
13229        __tmp.put_f32_le(self.DebugVar1);
13230        __tmp.put_f32_le(self.DebugVar2);
13231        __tmp.put_u8(self.ControlMode);
13232        __tmp.put_u8(self.valid);
13233        if matches!(version, MavlinkVersion::V2) {
13234            let len = __tmp.len();
13235            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13236        } else {
13237            __tmp.len()
13238        }
13239    }
13240}
13241#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
13242#[doc = ""]
13243#[doc = "ID: 373"]
13244#[derive(Debug, Clone, PartialEq)]
13245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13247#[cfg_attr(feature = "ts", derive(TS))]
13248#[cfg_attr(feature = "ts", ts(export))]
13249pub struct GENERATOR_STATUS_DATA {
13250    #[doc = "Status flags."]
13251    pub status: MavGeneratorStatusFlag,
13252    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
13253    pub battery_current: f32,
13254    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
13255    pub load_current: f32,
13256    #[doc = "The power being generated. NaN: field not provided"]
13257    pub power_generated: f32,
13258    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
13259    pub bus_voltage: f32,
13260    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
13261    pub bat_current_setpoint: f32,
13262    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
13263    pub runtime: u32,
13264    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
13265    pub time_until_maintenance: i32,
13266    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
13267    pub generator_speed: u16,
13268    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
13269    pub rectifier_temperature: i16,
13270    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
13271    pub generator_temperature: i16,
13272}
13273impl GENERATOR_STATUS_DATA {
13274    pub const ENCODED_LEN: usize = 42usize;
13275    pub const DEFAULT: Self = Self {
13276        status: MavGeneratorStatusFlag::DEFAULT,
13277        battery_current: 0.0_f32,
13278        load_current: 0.0_f32,
13279        power_generated: 0.0_f32,
13280        bus_voltage: 0.0_f32,
13281        bat_current_setpoint: 0.0_f32,
13282        runtime: 0_u32,
13283        time_until_maintenance: 0_i32,
13284        generator_speed: 0_u16,
13285        rectifier_temperature: 0_i16,
13286        generator_temperature: 0_i16,
13287    };
13288    #[cfg(feature = "arbitrary")]
13289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13290        use arbitrary::{Arbitrary, Unstructured};
13291        let mut buf = [0u8; 1024];
13292        rng.fill_bytes(&mut buf);
13293        let mut unstructured = Unstructured::new(&buf);
13294        Self::arbitrary(&mut unstructured).unwrap_or_default()
13295    }
13296}
13297impl Default for GENERATOR_STATUS_DATA {
13298    fn default() -> Self {
13299        Self::DEFAULT.clone()
13300    }
13301}
13302impl MessageData for GENERATOR_STATUS_DATA {
13303    type Message = MavMessage;
13304    const ID: u32 = 373u32;
13305    const NAME: &'static str = "GENERATOR_STATUS";
13306    const EXTRA_CRC: u8 = 117u8;
13307    const ENCODED_LEN: usize = 42usize;
13308    fn deser(
13309        _version: MavlinkVersion,
13310        __input: &[u8],
13311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13312        let avail_len = __input.len();
13313        let mut payload_buf = [0; Self::ENCODED_LEN];
13314        let mut buf = if avail_len < Self::ENCODED_LEN {
13315            payload_buf[0..avail_len].copy_from_slice(__input);
13316            Bytes::new(&payload_buf)
13317        } else {
13318            Bytes::new(__input)
13319        };
13320        let mut __struct = Self::default();
13321        let tmp = buf.get_u64_le()?;
13322        __struct.status =
13323            MavGeneratorStatusFlag::from_bits(tmp as <MavGeneratorStatusFlag as Flags>::Bits)
13324                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13325                    flag_type: "MavGeneratorStatusFlag",
13326                    value: tmp as u64,
13327                })?;
13328        __struct.battery_current = buf.get_f32_le()?;
13329        __struct.load_current = buf.get_f32_le()?;
13330        __struct.power_generated = buf.get_f32_le()?;
13331        __struct.bus_voltage = buf.get_f32_le()?;
13332        __struct.bat_current_setpoint = buf.get_f32_le()?;
13333        __struct.runtime = buf.get_u32_le()?;
13334        __struct.time_until_maintenance = buf.get_i32_le()?;
13335        __struct.generator_speed = buf.get_u16_le()?;
13336        __struct.rectifier_temperature = buf.get_i16_le()?;
13337        __struct.generator_temperature = buf.get_i16_le()?;
13338        Ok(__struct)
13339    }
13340    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13341        let mut __tmp = BytesMut::new(bytes);
13342        #[allow(clippy::absurd_extreme_comparisons)]
13343        #[allow(unused_comparisons)]
13344        if __tmp.remaining() < Self::ENCODED_LEN {
13345            panic!(
13346                "buffer is too small (need {} bytes, but got {})",
13347                Self::ENCODED_LEN,
13348                __tmp.remaining(),
13349            )
13350        }
13351        __tmp.put_u64_le(self.status.bits() as u64);
13352        __tmp.put_f32_le(self.battery_current);
13353        __tmp.put_f32_le(self.load_current);
13354        __tmp.put_f32_le(self.power_generated);
13355        __tmp.put_f32_le(self.bus_voltage);
13356        __tmp.put_f32_le(self.bat_current_setpoint);
13357        __tmp.put_u32_le(self.runtime);
13358        __tmp.put_i32_le(self.time_until_maintenance);
13359        __tmp.put_u16_le(self.generator_speed);
13360        __tmp.put_i16_le(self.rectifier_temperature);
13361        __tmp.put_i16_le(self.generator_temperature);
13362        if matches!(version, MavlinkVersion::V2) {
13363            let len = __tmp.len();
13364            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13365        } else {
13366            __tmp.len()
13367        }
13368    }
13369}
13370#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
13371#[doc = ""]
13372#[doc = "ID: 285"]
13373#[derive(Debug, Clone, PartialEq)]
13374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13376#[cfg_attr(feature = "ts", derive(TS))]
13377#[cfg_attr(feature = "ts", ts(export))]
13378pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13379    #[doc = "Timestamp (time since system boot)."]
13380    pub time_boot_ms: u32,
13381    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
13382    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13383    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13384    pub q: [f32; 4],
13385    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
13386    pub angular_velocity_x: f32,
13387    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
13388    pub angular_velocity_y: f32,
13389    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
13390    pub angular_velocity_z: f32,
13391    #[doc = "Failure flags (0 for no failure)"]
13392    pub failure_flags: GimbalDeviceErrorFlags,
13393    #[doc = "Current gimbal flags set."]
13394    pub flags: GimbalDeviceFlags,
13395    #[doc = "System ID"]
13396    pub target_system: u8,
13397    #[doc = "Component ID"]
13398    pub target_component: u8,
13399    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
13400    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13401    pub delta_yaw: f32,
13402    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
13403    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13404    pub delta_yaw_velocity: f32,
13405    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13406    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13407    pub gimbal_device_id: u8,
13408}
13409impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13410    pub const ENCODED_LEN: usize = 49usize;
13411    pub const DEFAULT: Self = Self {
13412        time_boot_ms: 0_u32,
13413        q: [0.0_f32; 4usize],
13414        angular_velocity_x: 0.0_f32,
13415        angular_velocity_y: 0.0_f32,
13416        angular_velocity_z: 0.0_f32,
13417        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
13418        flags: GimbalDeviceFlags::DEFAULT,
13419        target_system: 0_u8,
13420        target_component: 0_u8,
13421        delta_yaw: 0.0_f32,
13422        delta_yaw_velocity: 0.0_f32,
13423        gimbal_device_id: 0_u8,
13424    };
13425    #[cfg(feature = "arbitrary")]
13426    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13427        use arbitrary::{Arbitrary, Unstructured};
13428        let mut buf = [0u8; 1024];
13429        rng.fill_bytes(&mut buf);
13430        let mut unstructured = Unstructured::new(&buf);
13431        Self::arbitrary(&mut unstructured).unwrap_or_default()
13432    }
13433}
13434impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13435    fn default() -> Self {
13436        Self::DEFAULT.clone()
13437    }
13438}
13439impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13440    type Message = MavMessage;
13441    const ID: u32 = 285u32;
13442    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
13443    const EXTRA_CRC: u8 = 137u8;
13444    const ENCODED_LEN: usize = 49usize;
13445    fn deser(
13446        _version: MavlinkVersion,
13447        __input: &[u8],
13448    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13449        let avail_len = __input.len();
13450        let mut payload_buf = [0; Self::ENCODED_LEN];
13451        let mut buf = if avail_len < Self::ENCODED_LEN {
13452            payload_buf[0..avail_len].copy_from_slice(__input);
13453            Bytes::new(&payload_buf)
13454        } else {
13455            Bytes::new(__input)
13456        };
13457        let mut __struct = Self::default();
13458        __struct.time_boot_ms = buf.get_u32_le()?;
13459        for v in &mut __struct.q {
13460            let val = buf.get_f32_le()?;
13461            *v = val;
13462        }
13463        __struct.angular_velocity_x = buf.get_f32_le()?;
13464        __struct.angular_velocity_y = buf.get_f32_le()?;
13465        __struct.angular_velocity_z = buf.get_f32_le()?;
13466        let tmp = buf.get_u32_le()?;
13467        __struct.failure_flags =
13468            GimbalDeviceErrorFlags::from_bits(tmp as <GimbalDeviceErrorFlags as Flags>::Bits)
13469                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13470                    flag_type: "GimbalDeviceErrorFlags",
13471                    value: tmp as u64,
13472                })?;
13473        let tmp = buf.get_u16_le()?;
13474        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
13475            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13476                flag_type: "GimbalDeviceFlags",
13477                value: tmp as u64,
13478            })?;
13479        __struct.target_system = buf.get_u8()?;
13480        __struct.target_component = buf.get_u8()?;
13481        __struct.delta_yaw = buf.get_f32_le()?;
13482        __struct.delta_yaw_velocity = buf.get_f32_le()?;
13483        __struct.gimbal_device_id = buf.get_u8()?;
13484        Ok(__struct)
13485    }
13486    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13487        let mut __tmp = BytesMut::new(bytes);
13488        #[allow(clippy::absurd_extreme_comparisons)]
13489        #[allow(unused_comparisons)]
13490        if __tmp.remaining() < Self::ENCODED_LEN {
13491            panic!(
13492                "buffer is too small (need {} bytes, but got {})",
13493                Self::ENCODED_LEN,
13494                __tmp.remaining(),
13495            )
13496        }
13497        __tmp.put_u32_le(self.time_boot_ms);
13498        for val in &self.q {
13499            __tmp.put_f32_le(*val);
13500        }
13501        __tmp.put_f32_le(self.angular_velocity_x);
13502        __tmp.put_f32_le(self.angular_velocity_y);
13503        __tmp.put_f32_le(self.angular_velocity_z);
13504        __tmp.put_u32_le(self.failure_flags.bits() as u32);
13505        __tmp.put_u16_le(self.flags.bits() as u16);
13506        __tmp.put_u8(self.target_system);
13507        __tmp.put_u8(self.target_component);
13508        if matches!(version, MavlinkVersion::V2) {
13509            __tmp.put_f32_le(self.delta_yaw);
13510            __tmp.put_f32_le(self.delta_yaw_velocity);
13511            __tmp.put_u8(self.gimbal_device_id);
13512            let len = __tmp.len();
13513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13514        } else {
13515            __tmp.len()
13516        }
13517    }
13518}
13519#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
13520#[doc = ""]
13521#[doc = "ID: 283"]
13522#[derive(Debug, Clone, PartialEq)]
13523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13525#[cfg_attr(feature = "ts", derive(TS))]
13526#[cfg_attr(feature = "ts", ts(export))]
13527pub struct GIMBAL_DEVICE_INFORMATION_DATA {
13528    #[doc = "UID of gimbal hardware (0 if unknown)."]
13529    pub uid: u64,
13530    #[doc = "Timestamp (time since system boot)."]
13531    pub time_boot_ms: u32,
13532    #[doc = "0xff)."]
13533    pub firmware_version: u32,
13534    #[doc = "0xff)."]
13535    pub hardware_version: u32,
13536    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13537    pub roll_min: f32,
13538    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13539    pub roll_max: f32,
13540    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13541    pub pitch_min: f32,
13542    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13543    pub pitch_max: f32,
13544    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13545    pub yaw_min: f32,
13546    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13547    pub yaw_max: f32,
13548    #[doc = "Bitmap of gimbal capability flags."]
13549    pub cap_flags: GimbalDeviceCapFlags,
13550    #[doc = "Bitmap for use for gimbal-specific capability flags."]
13551    pub custom_cap_flags: u16,
13552    #[doc = "Name of the gimbal vendor."]
13553    #[cfg_attr(feature = "ts", ts(type = "string"))]
13554    pub vendor_name: CharArray<32>,
13555    #[doc = "Name of the gimbal model."]
13556    #[cfg_attr(feature = "ts", ts(type = "string"))]
13557    pub model_name: CharArray<32>,
13558    #[doc = "Custom name of the gimbal given to it by the user."]
13559    #[cfg_attr(feature = "ts", ts(type = "string"))]
13560    pub custom_name: CharArray<32>,
13561    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13562    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13563    pub gimbal_device_id: u8,
13564}
13565impl GIMBAL_DEVICE_INFORMATION_DATA {
13566    pub const ENCODED_LEN: usize = 145usize;
13567    pub const DEFAULT: Self = Self {
13568        uid: 0_u64,
13569        time_boot_ms: 0_u32,
13570        firmware_version: 0_u32,
13571        hardware_version: 0_u32,
13572        roll_min: 0.0_f32,
13573        roll_max: 0.0_f32,
13574        pitch_min: 0.0_f32,
13575        pitch_max: 0.0_f32,
13576        yaw_min: 0.0_f32,
13577        yaw_max: 0.0_f32,
13578        cap_flags: GimbalDeviceCapFlags::DEFAULT,
13579        custom_cap_flags: 0_u16,
13580        vendor_name: CharArray::new([0_u8; 32usize]),
13581        model_name: CharArray::new([0_u8; 32usize]),
13582        custom_name: CharArray::new([0_u8; 32usize]),
13583        gimbal_device_id: 0_u8,
13584    };
13585    #[cfg(feature = "arbitrary")]
13586    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13587        use arbitrary::{Arbitrary, Unstructured};
13588        let mut buf = [0u8; 1024];
13589        rng.fill_bytes(&mut buf);
13590        let mut unstructured = Unstructured::new(&buf);
13591        Self::arbitrary(&mut unstructured).unwrap_or_default()
13592    }
13593}
13594impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
13595    fn default() -> Self {
13596        Self::DEFAULT.clone()
13597    }
13598}
13599impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
13600    type Message = MavMessage;
13601    const ID: u32 = 283u32;
13602    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
13603    const EXTRA_CRC: u8 = 74u8;
13604    const ENCODED_LEN: usize = 145usize;
13605    fn deser(
13606        _version: MavlinkVersion,
13607        __input: &[u8],
13608    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13609        let avail_len = __input.len();
13610        let mut payload_buf = [0; Self::ENCODED_LEN];
13611        let mut buf = if avail_len < Self::ENCODED_LEN {
13612            payload_buf[0..avail_len].copy_from_slice(__input);
13613            Bytes::new(&payload_buf)
13614        } else {
13615            Bytes::new(__input)
13616        };
13617        let mut __struct = Self::default();
13618        __struct.uid = buf.get_u64_le()?;
13619        __struct.time_boot_ms = buf.get_u32_le()?;
13620        __struct.firmware_version = buf.get_u32_le()?;
13621        __struct.hardware_version = buf.get_u32_le()?;
13622        __struct.roll_min = buf.get_f32_le()?;
13623        __struct.roll_max = buf.get_f32_le()?;
13624        __struct.pitch_min = buf.get_f32_le()?;
13625        __struct.pitch_max = buf.get_f32_le()?;
13626        __struct.yaw_min = buf.get_f32_le()?;
13627        __struct.yaw_max = buf.get_f32_le()?;
13628        let tmp = buf.get_u16_le()?;
13629        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
13630            tmp as <GimbalDeviceCapFlags as Flags>::Bits,
13631        )
13632        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13633            flag_type: "GimbalDeviceCapFlags",
13634            value: tmp as u64,
13635        })?;
13636        __struct.custom_cap_flags = buf.get_u16_le()?;
13637        let mut tmp = [0_u8; 32usize];
13638        for v in &mut tmp {
13639            *v = buf.get_u8()?;
13640        }
13641        __struct.vendor_name = CharArray::new(tmp);
13642        let mut tmp = [0_u8; 32usize];
13643        for v in &mut tmp {
13644            *v = buf.get_u8()?;
13645        }
13646        __struct.model_name = CharArray::new(tmp);
13647        let mut tmp = [0_u8; 32usize];
13648        for v in &mut tmp {
13649            *v = buf.get_u8()?;
13650        }
13651        __struct.custom_name = CharArray::new(tmp);
13652        __struct.gimbal_device_id = buf.get_u8()?;
13653        Ok(__struct)
13654    }
13655    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13656        let mut __tmp = BytesMut::new(bytes);
13657        #[allow(clippy::absurd_extreme_comparisons)]
13658        #[allow(unused_comparisons)]
13659        if __tmp.remaining() < Self::ENCODED_LEN {
13660            panic!(
13661                "buffer is too small (need {} bytes, but got {})",
13662                Self::ENCODED_LEN,
13663                __tmp.remaining(),
13664            )
13665        }
13666        __tmp.put_u64_le(self.uid);
13667        __tmp.put_u32_le(self.time_boot_ms);
13668        __tmp.put_u32_le(self.firmware_version);
13669        __tmp.put_u32_le(self.hardware_version);
13670        __tmp.put_f32_le(self.roll_min);
13671        __tmp.put_f32_le(self.roll_max);
13672        __tmp.put_f32_le(self.pitch_min);
13673        __tmp.put_f32_le(self.pitch_max);
13674        __tmp.put_f32_le(self.yaw_min);
13675        __tmp.put_f32_le(self.yaw_max);
13676        __tmp.put_u16_le(self.cap_flags.bits() as u16);
13677        __tmp.put_u16_le(self.custom_cap_flags);
13678        for val in &self.vendor_name {
13679            __tmp.put_u8(*val);
13680        }
13681        for val in &self.model_name {
13682            __tmp.put_u8(*val);
13683        }
13684        for val in &self.custom_name {
13685            __tmp.put_u8(*val);
13686        }
13687        if matches!(version, MavlinkVersion::V2) {
13688            __tmp.put_u8(self.gimbal_device_id);
13689            let len = __tmp.len();
13690            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13691        } else {
13692            __tmp.len()
13693        }
13694    }
13695}
13696#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
13697#[doc = ""]
13698#[doc = "ID: 284"]
13699#[derive(Debug, Clone, PartialEq)]
13700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13702#[cfg_attr(feature = "ts", derive(TS))]
13703#[cfg_attr(feature = "ts", ts(export))]
13704pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13705    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
13706    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13707    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13708    pub q: [f32; 4],
13709    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
13710    pub angular_velocity_x: f32,
13711    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
13712    pub angular_velocity_y: f32,
13713    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
13714    pub angular_velocity_z: f32,
13715    #[doc = "Low level gimbal flags."]
13716    pub flags: GimbalDeviceFlags,
13717    #[doc = "System ID"]
13718    pub target_system: u8,
13719    #[doc = "Component ID"]
13720    pub target_component: u8,
13721}
13722impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13723    pub const ENCODED_LEN: usize = 32usize;
13724    pub const DEFAULT: Self = Self {
13725        q: [0.0_f32; 4usize],
13726        angular_velocity_x: 0.0_f32,
13727        angular_velocity_y: 0.0_f32,
13728        angular_velocity_z: 0.0_f32,
13729        flags: GimbalDeviceFlags::DEFAULT,
13730        target_system: 0_u8,
13731        target_component: 0_u8,
13732    };
13733    #[cfg(feature = "arbitrary")]
13734    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13735        use arbitrary::{Arbitrary, Unstructured};
13736        let mut buf = [0u8; 1024];
13737        rng.fill_bytes(&mut buf);
13738        let mut unstructured = Unstructured::new(&buf);
13739        Self::arbitrary(&mut unstructured).unwrap_or_default()
13740    }
13741}
13742impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13743    fn default() -> Self {
13744        Self::DEFAULT.clone()
13745    }
13746}
13747impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13748    type Message = MavMessage;
13749    const ID: u32 = 284u32;
13750    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13751    const EXTRA_CRC: u8 = 99u8;
13752    const ENCODED_LEN: usize = 32usize;
13753    fn deser(
13754        _version: MavlinkVersion,
13755        __input: &[u8],
13756    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13757        let avail_len = __input.len();
13758        let mut payload_buf = [0; Self::ENCODED_LEN];
13759        let mut buf = if avail_len < Self::ENCODED_LEN {
13760            payload_buf[0..avail_len].copy_from_slice(__input);
13761            Bytes::new(&payload_buf)
13762        } else {
13763            Bytes::new(__input)
13764        };
13765        let mut __struct = Self::default();
13766        for v in &mut __struct.q {
13767            let val = buf.get_f32_le()?;
13768            *v = val;
13769        }
13770        __struct.angular_velocity_x = buf.get_f32_le()?;
13771        __struct.angular_velocity_y = buf.get_f32_le()?;
13772        __struct.angular_velocity_z = buf.get_f32_le()?;
13773        let tmp = buf.get_u16_le()?;
13774        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
13775            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13776                flag_type: "GimbalDeviceFlags",
13777                value: tmp as u64,
13778            })?;
13779        __struct.target_system = buf.get_u8()?;
13780        __struct.target_component = buf.get_u8()?;
13781        Ok(__struct)
13782    }
13783    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13784        let mut __tmp = BytesMut::new(bytes);
13785        #[allow(clippy::absurd_extreme_comparisons)]
13786        #[allow(unused_comparisons)]
13787        if __tmp.remaining() < Self::ENCODED_LEN {
13788            panic!(
13789                "buffer is too small (need {} bytes, but got {})",
13790                Self::ENCODED_LEN,
13791                __tmp.remaining(),
13792            )
13793        }
13794        for val in &self.q {
13795            __tmp.put_f32_le(*val);
13796        }
13797        __tmp.put_f32_le(self.angular_velocity_x);
13798        __tmp.put_f32_le(self.angular_velocity_y);
13799        __tmp.put_f32_le(self.angular_velocity_z);
13800        __tmp.put_u16_le(self.flags.bits() as u16);
13801        __tmp.put_u8(self.target_system);
13802        __tmp.put_u8(self.target_component);
13803        if matches!(version, MavlinkVersion::V2) {
13804            let len = __tmp.len();
13805            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13806        } else {
13807            __tmp.len()
13808        }
13809    }
13810}
13811#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13812#[doc = ""]
13813#[doc = "ID: 280"]
13814#[derive(Debug, Clone, PartialEq)]
13815#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13817#[cfg_attr(feature = "ts", derive(TS))]
13818#[cfg_attr(feature = "ts", ts(export))]
13819pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13820    #[doc = "Timestamp (time since system boot)."]
13821    pub time_boot_ms: u32,
13822    #[doc = "Bitmap of gimbal capability flags."]
13823    pub cap_flags: GimbalManagerCapFlags,
13824    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13825    pub roll_min: f32,
13826    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13827    pub roll_max: f32,
13828    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13829    pub pitch_min: f32,
13830    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13831    pub pitch_max: f32,
13832    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13833    pub yaw_min: f32,
13834    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13835    pub yaw_max: f32,
13836    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13837    pub gimbal_device_id: u8,
13838}
13839impl GIMBAL_MANAGER_INFORMATION_DATA {
13840    pub const ENCODED_LEN: usize = 33usize;
13841    pub const DEFAULT: Self = Self {
13842        time_boot_ms: 0_u32,
13843        cap_flags: GimbalManagerCapFlags::DEFAULT,
13844        roll_min: 0.0_f32,
13845        roll_max: 0.0_f32,
13846        pitch_min: 0.0_f32,
13847        pitch_max: 0.0_f32,
13848        yaw_min: 0.0_f32,
13849        yaw_max: 0.0_f32,
13850        gimbal_device_id: 0_u8,
13851    };
13852    #[cfg(feature = "arbitrary")]
13853    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13854        use arbitrary::{Arbitrary, Unstructured};
13855        let mut buf = [0u8; 1024];
13856        rng.fill_bytes(&mut buf);
13857        let mut unstructured = Unstructured::new(&buf);
13858        Self::arbitrary(&mut unstructured).unwrap_or_default()
13859    }
13860}
13861impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13862    fn default() -> Self {
13863        Self::DEFAULT.clone()
13864    }
13865}
13866impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13867    type Message = MavMessage;
13868    const ID: u32 = 280u32;
13869    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13870    const EXTRA_CRC: u8 = 70u8;
13871    const ENCODED_LEN: usize = 33usize;
13872    fn deser(
13873        _version: MavlinkVersion,
13874        __input: &[u8],
13875    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13876        let avail_len = __input.len();
13877        let mut payload_buf = [0; Self::ENCODED_LEN];
13878        let mut buf = if avail_len < Self::ENCODED_LEN {
13879            payload_buf[0..avail_len].copy_from_slice(__input);
13880            Bytes::new(&payload_buf)
13881        } else {
13882            Bytes::new(__input)
13883        };
13884        let mut __struct = Self::default();
13885        __struct.time_boot_ms = buf.get_u32_le()?;
13886        let tmp = buf.get_u32_le()?;
13887        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13888            tmp as <GimbalManagerCapFlags as Flags>::Bits,
13889        )
13890        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13891            flag_type: "GimbalManagerCapFlags",
13892            value: tmp as u64,
13893        })?;
13894        __struct.roll_min = buf.get_f32_le()?;
13895        __struct.roll_max = buf.get_f32_le()?;
13896        __struct.pitch_min = buf.get_f32_le()?;
13897        __struct.pitch_max = buf.get_f32_le()?;
13898        __struct.yaw_min = buf.get_f32_le()?;
13899        __struct.yaw_max = buf.get_f32_le()?;
13900        __struct.gimbal_device_id = buf.get_u8()?;
13901        Ok(__struct)
13902    }
13903    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13904        let mut __tmp = BytesMut::new(bytes);
13905        #[allow(clippy::absurd_extreme_comparisons)]
13906        #[allow(unused_comparisons)]
13907        if __tmp.remaining() < Self::ENCODED_LEN {
13908            panic!(
13909                "buffer is too small (need {} bytes, but got {})",
13910                Self::ENCODED_LEN,
13911                __tmp.remaining(),
13912            )
13913        }
13914        __tmp.put_u32_le(self.time_boot_ms);
13915        __tmp.put_u32_le(self.cap_flags.bits() as u32);
13916        __tmp.put_f32_le(self.roll_min);
13917        __tmp.put_f32_le(self.roll_max);
13918        __tmp.put_f32_le(self.pitch_min);
13919        __tmp.put_f32_le(self.pitch_max);
13920        __tmp.put_f32_le(self.yaw_min);
13921        __tmp.put_f32_le(self.yaw_max);
13922        __tmp.put_u8(self.gimbal_device_id);
13923        if matches!(version, MavlinkVersion::V2) {
13924            let len = __tmp.len();
13925            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13926        } else {
13927            __tmp.len()
13928        }
13929    }
13930}
13931#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13932#[doc = ""]
13933#[doc = "ID: 282"]
13934#[derive(Debug, Clone, PartialEq)]
13935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13936#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13937#[cfg_attr(feature = "ts", derive(TS))]
13938#[cfg_attr(feature = "ts", ts(export))]
13939pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13940    #[doc = "High level gimbal manager flags to use."]
13941    pub flags: GimbalManagerFlags,
13942    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13943    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13944    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13945    pub q: [f32; 4],
13946    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13947    pub angular_velocity_x: f32,
13948    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13949    pub angular_velocity_y: f32,
13950    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13951    pub angular_velocity_z: f32,
13952    #[doc = "System ID"]
13953    pub target_system: u8,
13954    #[doc = "Component ID"]
13955    pub target_component: u8,
13956    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13957    pub gimbal_device_id: u8,
13958}
13959impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13960    pub const ENCODED_LEN: usize = 35usize;
13961    pub const DEFAULT: Self = Self {
13962        flags: GimbalManagerFlags::DEFAULT,
13963        q: [0.0_f32; 4usize],
13964        angular_velocity_x: 0.0_f32,
13965        angular_velocity_y: 0.0_f32,
13966        angular_velocity_z: 0.0_f32,
13967        target_system: 0_u8,
13968        target_component: 0_u8,
13969        gimbal_device_id: 0_u8,
13970    };
13971    #[cfg(feature = "arbitrary")]
13972    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13973        use arbitrary::{Arbitrary, Unstructured};
13974        let mut buf = [0u8; 1024];
13975        rng.fill_bytes(&mut buf);
13976        let mut unstructured = Unstructured::new(&buf);
13977        Self::arbitrary(&mut unstructured).unwrap_or_default()
13978    }
13979}
13980impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13981    fn default() -> Self {
13982        Self::DEFAULT.clone()
13983    }
13984}
13985impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13986    type Message = MavMessage;
13987    const ID: u32 = 282u32;
13988    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13989    const EXTRA_CRC: u8 = 123u8;
13990    const ENCODED_LEN: usize = 35usize;
13991    fn deser(
13992        _version: MavlinkVersion,
13993        __input: &[u8],
13994    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13995        let avail_len = __input.len();
13996        let mut payload_buf = [0; Self::ENCODED_LEN];
13997        let mut buf = if avail_len < Self::ENCODED_LEN {
13998            payload_buf[0..avail_len].copy_from_slice(__input);
13999            Bytes::new(&payload_buf)
14000        } else {
14001            Bytes::new(__input)
14002        };
14003        let mut __struct = Self::default();
14004        let tmp = buf.get_u32_le()?;
14005        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
14006            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14007                flag_type: "GimbalManagerFlags",
14008                value: tmp as u64,
14009            })?;
14010        for v in &mut __struct.q {
14011            let val = buf.get_f32_le()?;
14012            *v = val;
14013        }
14014        __struct.angular_velocity_x = buf.get_f32_le()?;
14015        __struct.angular_velocity_y = buf.get_f32_le()?;
14016        __struct.angular_velocity_z = buf.get_f32_le()?;
14017        __struct.target_system = buf.get_u8()?;
14018        __struct.target_component = buf.get_u8()?;
14019        __struct.gimbal_device_id = buf.get_u8()?;
14020        Ok(__struct)
14021    }
14022    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14023        let mut __tmp = BytesMut::new(bytes);
14024        #[allow(clippy::absurd_extreme_comparisons)]
14025        #[allow(unused_comparisons)]
14026        if __tmp.remaining() < Self::ENCODED_LEN {
14027            panic!(
14028                "buffer is too small (need {} bytes, but got {})",
14029                Self::ENCODED_LEN,
14030                __tmp.remaining(),
14031            )
14032        }
14033        __tmp.put_u32_le(self.flags.bits() as u32);
14034        for val in &self.q {
14035            __tmp.put_f32_le(*val);
14036        }
14037        __tmp.put_f32_le(self.angular_velocity_x);
14038        __tmp.put_f32_le(self.angular_velocity_y);
14039        __tmp.put_f32_le(self.angular_velocity_z);
14040        __tmp.put_u8(self.target_system);
14041        __tmp.put_u8(self.target_component);
14042        __tmp.put_u8(self.gimbal_device_id);
14043        if matches!(version, MavlinkVersion::V2) {
14044            let len = __tmp.len();
14045            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14046        } else {
14047            __tmp.len()
14048        }
14049    }
14050}
14051#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
14052#[doc = ""]
14053#[doc = "ID: 288"]
14054#[derive(Debug, Clone, PartialEq)]
14055#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14056#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14057#[cfg_attr(feature = "ts", derive(TS))]
14058#[cfg_attr(feature = "ts", ts(export))]
14059pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14060    #[doc = "High level gimbal manager flags."]
14061    pub flags: GimbalManagerFlags,
14062    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
14063    pub pitch: f32,
14064    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
14065    pub yaw: f32,
14066    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
14067    pub pitch_rate: f32,
14068    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
14069    pub yaw_rate: f32,
14070    #[doc = "System ID"]
14071    pub target_system: u8,
14072    #[doc = "Component ID"]
14073    pub target_component: u8,
14074    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
14075    pub gimbal_device_id: u8,
14076}
14077impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14078    pub const ENCODED_LEN: usize = 23usize;
14079    pub const DEFAULT: Self = Self {
14080        flags: GimbalManagerFlags::DEFAULT,
14081        pitch: 0.0_f32,
14082        yaw: 0.0_f32,
14083        pitch_rate: 0.0_f32,
14084        yaw_rate: 0.0_f32,
14085        target_system: 0_u8,
14086        target_component: 0_u8,
14087        gimbal_device_id: 0_u8,
14088    };
14089    #[cfg(feature = "arbitrary")]
14090    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14091        use arbitrary::{Arbitrary, Unstructured};
14092        let mut buf = [0u8; 1024];
14093        rng.fill_bytes(&mut buf);
14094        let mut unstructured = Unstructured::new(&buf);
14095        Self::arbitrary(&mut unstructured).unwrap_or_default()
14096    }
14097}
14098impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14099    fn default() -> Self {
14100        Self::DEFAULT.clone()
14101    }
14102}
14103impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14104    type Message = MavMessage;
14105    const ID: u32 = 288u32;
14106    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
14107    const EXTRA_CRC: u8 = 20u8;
14108    const ENCODED_LEN: usize = 23usize;
14109    fn deser(
14110        _version: MavlinkVersion,
14111        __input: &[u8],
14112    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14113        let avail_len = __input.len();
14114        let mut payload_buf = [0; Self::ENCODED_LEN];
14115        let mut buf = if avail_len < Self::ENCODED_LEN {
14116            payload_buf[0..avail_len].copy_from_slice(__input);
14117            Bytes::new(&payload_buf)
14118        } else {
14119            Bytes::new(__input)
14120        };
14121        let mut __struct = Self::default();
14122        let tmp = buf.get_u32_le()?;
14123        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
14124            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14125                flag_type: "GimbalManagerFlags",
14126                value: tmp as u64,
14127            })?;
14128        __struct.pitch = buf.get_f32_le()?;
14129        __struct.yaw = buf.get_f32_le()?;
14130        __struct.pitch_rate = buf.get_f32_le()?;
14131        __struct.yaw_rate = buf.get_f32_le()?;
14132        __struct.target_system = buf.get_u8()?;
14133        __struct.target_component = buf.get_u8()?;
14134        __struct.gimbal_device_id = buf.get_u8()?;
14135        Ok(__struct)
14136    }
14137    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14138        let mut __tmp = BytesMut::new(bytes);
14139        #[allow(clippy::absurd_extreme_comparisons)]
14140        #[allow(unused_comparisons)]
14141        if __tmp.remaining() < Self::ENCODED_LEN {
14142            panic!(
14143                "buffer is too small (need {} bytes, but got {})",
14144                Self::ENCODED_LEN,
14145                __tmp.remaining(),
14146            )
14147        }
14148        __tmp.put_u32_le(self.flags.bits() as u32);
14149        __tmp.put_f32_le(self.pitch);
14150        __tmp.put_f32_le(self.yaw);
14151        __tmp.put_f32_le(self.pitch_rate);
14152        __tmp.put_f32_le(self.yaw_rate);
14153        __tmp.put_u8(self.target_system);
14154        __tmp.put_u8(self.target_component);
14155        __tmp.put_u8(self.gimbal_device_id);
14156        if matches!(version, MavlinkVersion::V2) {
14157            let len = __tmp.len();
14158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14159        } else {
14160            __tmp.len()
14161        }
14162    }
14163}
14164#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
14165#[doc = ""]
14166#[doc = "ID: 287"]
14167#[derive(Debug, Clone, PartialEq)]
14168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14170#[cfg_attr(feature = "ts", derive(TS))]
14171#[cfg_attr(feature = "ts", ts(export))]
14172pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14173    #[doc = "High level gimbal manager flags to use."]
14174    pub flags: GimbalManagerFlags,
14175    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
14176    pub pitch: f32,
14177    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
14178    pub yaw: f32,
14179    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
14180    pub pitch_rate: f32,
14181    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
14182    pub yaw_rate: f32,
14183    #[doc = "System ID"]
14184    pub target_system: u8,
14185    #[doc = "Component ID"]
14186    pub target_component: u8,
14187    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
14188    pub gimbal_device_id: u8,
14189}
14190impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14191    pub const ENCODED_LEN: usize = 23usize;
14192    pub const DEFAULT: Self = Self {
14193        flags: GimbalManagerFlags::DEFAULT,
14194        pitch: 0.0_f32,
14195        yaw: 0.0_f32,
14196        pitch_rate: 0.0_f32,
14197        yaw_rate: 0.0_f32,
14198        target_system: 0_u8,
14199        target_component: 0_u8,
14200        gimbal_device_id: 0_u8,
14201    };
14202    #[cfg(feature = "arbitrary")]
14203    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14204        use arbitrary::{Arbitrary, Unstructured};
14205        let mut buf = [0u8; 1024];
14206        rng.fill_bytes(&mut buf);
14207        let mut unstructured = Unstructured::new(&buf);
14208        Self::arbitrary(&mut unstructured).unwrap_or_default()
14209    }
14210}
14211impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14212    fn default() -> Self {
14213        Self::DEFAULT.clone()
14214    }
14215}
14216impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14217    type Message = MavMessage;
14218    const ID: u32 = 287u32;
14219    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
14220    const EXTRA_CRC: u8 = 1u8;
14221    const ENCODED_LEN: usize = 23usize;
14222    fn deser(
14223        _version: MavlinkVersion,
14224        __input: &[u8],
14225    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14226        let avail_len = __input.len();
14227        let mut payload_buf = [0; Self::ENCODED_LEN];
14228        let mut buf = if avail_len < Self::ENCODED_LEN {
14229            payload_buf[0..avail_len].copy_from_slice(__input);
14230            Bytes::new(&payload_buf)
14231        } else {
14232            Bytes::new(__input)
14233        };
14234        let mut __struct = Self::default();
14235        let tmp = buf.get_u32_le()?;
14236        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
14237            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14238                flag_type: "GimbalManagerFlags",
14239                value: tmp as u64,
14240            })?;
14241        __struct.pitch = buf.get_f32_le()?;
14242        __struct.yaw = buf.get_f32_le()?;
14243        __struct.pitch_rate = buf.get_f32_le()?;
14244        __struct.yaw_rate = buf.get_f32_le()?;
14245        __struct.target_system = buf.get_u8()?;
14246        __struct.target_component = buf.get_u8()?;
14247        __struct.gimbal_device_id = buf.get_u8()?;
14248        Ok(__struct)
14249    }
14250    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14251        let mut __tmp = BytesMut::new(bytes);
14252        #[allow(clippy::absurd_extreme_comparisons)]
14253        #[allow(unused_comparisons)]
14254        if __tmp.remaining() < Self::ENCODED_LEN {
14255            panic!(
14256                "buffer is too small (need {} bytes, but got {})",
14257                Self::ENCODED_LEN,
14258                __tmp.remaining(),
14259            )
14260        }
14261        __tmp.put_u32_le(self.flags.bits() as u32);
14262        __tmp.put_f32_le(self.pitch);
14263        __tmp.put_f32_le(self.yaw);
14264        __tmp.put_f32_le(self.pitch_rate);
14265        __tmp.put_f32_le(self.yaw_rate);
14266        __tmp.put_u8(self.target_system);
14267        __tmp.put_u8(self.target_component);
14268        __tmp.put_u8(self.gimbal_device_id);
14269        if matches!(version, MavlinkVersion::V2) {
14270            let len = __tmp.len();
14271            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14272        } else {
14273            __tmp.len()
14274        }
14275    }
14276}
14277#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
14278#[doc = ""]
14279#[doc = "ID: 281"]
14280#[derive(Debug, Clone, PartialEq)]
14281#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14282#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14283#[cfg_attr(feature = "ts", derive(TS))]
14284#[cfg_attr(feature = "ts", ts(export))]
14285pub struct GIMBAL_MANAGER_STATUS_DATA {
14286    #[doc = "Timestamp (time since system boot)."]
14287    pub time_boot_ms: u32,
14288    #[doc = "High level gimbal manager flags currently applied."]
14289    pub flags: GimbalManagerFlags,
14290    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
14291    pub gimbal_device_id: u8,
14292    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
14293    pub primary_control_sysid: u8,
14294    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
14295    pub primary_control_compid: u8,
14296    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
14297    pub secondary_control_sysid: u8,
14298    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
14299    pub secondary_control_compid: u8,
14300}
14301impl GIMBAL_MANAGER_STATUS_DATA {
14302    pub const ENCODED_LEN: usize = 13usize;
14303    pub const DEFAULT: Self = Self {
14304        time_boot_ms: 0_u32,
14305        flags: GimbalManagerFlags::DEFAULT,
14306        gimbal_device_id: 0_u8,
14307        primary_control_sysid: 0_u8,
14308        primary_control_compid: 0_u8,
14309        secondary_control_sysid: 0_u8,
14310        secondary_control_compid: 0_u8,
14311    };
14312    #[cfg(feature = "arbitrary")]
14313    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14314        use arbitrary::{Arbitrary, Unstructured};
14315        let mut buf = [0u8; 1024];
14316        rng.fill_bytes(&mut buf);
14317        let mut unstructured = Unstructured::new(&buf);
14318        Self::arbitrary(&mut unstructured).unwrap_or_default()
14319    }
14320}
14321impl Default for GIMBAL_MANAGER_STATUS_DATA {
14322    fn default() -> Self {
14323        Self::DEFAULT.clone()
14324    }
14325}
14326impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
14327    type Message = MavMessage;
14328    const ID: u32 = 281u32;
14329    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
14330    const EXTRA_CRC: u8 = 48u8;
14331    const ENCODED_LEN: usize = 13usize;
14332    fn deser(
14333        _version: MavlinkVersion,
14334        __input: &[u8],
14335    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14336        let avail_len = __input.len();
14337        let mut payload_buf = [0; Self::ENCODED_LEN];
14338        let mut buf = if avail_len < Self::ENCODED_LEN {
14339            payload_buf[0..avail_len].copy_from_slice(__input);
14340            Bytes::new(&payload_buf)
14341        } else {
14342            Bytes::new(__input)
14343        };
14344        let mut __struct = Self::default();
14345        __struct.time_boot_ms = buf.get_u32_le()?;
14346        let tmp = buf.get_u32_le()?;
14347        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
14348            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14349                flag_type: "GimbalManagerFlags",
14350                value: tmp as u64,
14351            })?;
14352        __struct.gimbal_device_id = buf.get_u8()?;
14353        __struct.primary_control_sysid = buf.get_u8()?;
14354        __struct.primary_control_compid = buf.get_u8()?;
14355        __struct.secondary_control_sysid = buf.get_u8()?;
14356        __struct.secondary_control_compid = buf.get_u8()?;
14357        Ok(__struct)
14358    }
14359    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14360        let mut __tmp = BytesMut::new(bytes);
14361        #[allow(clippy::absurd_extreme_comparisons)]
14362        #[allow(unused_comparisons)]
14363        if __tmp.remaining() < Self::ENCODED_LEN {
14364            panic!(
14365                "buffer is too small (need {} bytes, but got {})",
14366                Self::ENCODED_LEN,
14367                __tmp.remaining(),
14368            )
14369        }
14370        __tmp.put_u32_le(self.time_boot_ms);
14371        __tmp.put_u32_le(self.flags.bits() as u32);
14372        __tmp.put_u8(self.gimbal_device_id);
14373        __tmp.put_u8(self.primary_control_sysid);
14374        __tmp.put_u8(self.primary_control_compid);
14375        __tmp.put_u8(self.secondary_control_sysid);
14376        __tmp.put_u8(self.secondary_control_compid);
14377        if matches!(version, MavlinkVersion::V2) {
14378            let len = __tmp.len();
14379            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14380        } else {
14381            __tmp.len()
14382        }
14383    }
14384}
14385#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
14386#[doc = ""]
14387#[doc = "ID: 33"]
14388#[derive(Debug, Clone, PartialEq)]
14389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14390#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14391#[cfg_attr(feature = "ts", derive(TS))]
14392#[cfg_attr(feature = "ts", ts(export))]
14393pub struct GLOBAL_POSITION_INT_DATA {
14394    #[doc = "Timestamp (time since system boot)."]
14395    pub time_boot_ms: u32,
14396    #[doc = "Latitude, expressed"]
14397    pub lat: i32,
14398    #[doc = "Longitude, expressed"]
14399    pub lon: i32,
14400    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
14401    pub alt: i32,
14402    #[doc = "Altitude above home"]
14403    pub relative_alt: i32,
14404    #[doc = "Ground X Speed (Latitude, positive north)"]
14405    pub vx: i16,
14406    #[doc = "Ground Y Speed (Longitude, positive east)"]
14407    pub vy: i16,
14408    #[doc = "Ground Z Speed (Altitude, positive down)"]
14409    pub vz: i16,
14410    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14411    pub hdg: u16,
14412}
14413impl GLOBAL_POSITION_INT_DATA {
14414    pub const ENCODED_LEN: usize = 28usize;
14415    pub const DEFAULT: Self = Self {
14416        time_boot_ms: 0_u32,
14417        lat: 0_i32,
14418        lon: 0_i32,
14419        alt: 0_i32,
14420        relative_alt: 0_i32,
14421        vx: 0_i16,
14422        vy: 0_i16,
14423        vz: 0_i16,
14424        hdg: 0_u16,
14425    };
14426    #[cfg(feature = "arbitrary")]
14427    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14428        use arbitrary::{Arbitrary, Unstructured};
14429        let mut buf = [0u8; 1024];
14430        rng.fill_bytes(&mut buf);
14431        let mut unstructured = Unstructured::new(&buf);
14432        Self::arbitrary(&mut unstructured).unwrap_or_default()
14433    }
14434}
14435impl Default for GLOBAL_POSITION_INT_DATA {
14436    fn default() -> Self {
14437        Self::DEFAULT.clone()
14438    }
14439}
14440impl MessageData for GLOBAL_POSITION_INT_DATA {
14441    type Message = MavMessage;
14442    const ID: u32 = 33u32;
14443    const NAME: &'static str = "GLOBAL_POSITION_INT";
14444    const EXTRA_CRC: u8 = 104u8;
14445    const ENCODED_LEN: usize = 28usize;
14446    fn deser(
14447        _version: MavlinkVersion,
14448        __input: &[u8],
14449    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14450        let avail_len = __input.len();
14451        let mut payload_buf = [0; Self::ENCODED_LEN];
14452        let mut buf = if avail_len < Self::ENCODED_LEN {
14453            payload_buf[0..avail_len].copy_from_slice(__input);
14454            Bytes::new(&payload_buf)
14455        } else {
14456            Bytes::new(__input)
14457        };
14458        let mut __struct = Self::default();
14459        __struct.time_boot_ms = buf.get_u32_le()?;
14460        __struct.lat = buf.get_i32_le()?;
14461        __struct.lon = buf.get_i32_le()?;
14462        __struct.alt = buf.get_i32_le()?;
14463        __struct.relative_alt = buf.get_i32_le()?;
14464        __struct.vx = buf.get_i16_le()?;
14465        __struct.vy = buf.get_i16_le()?;
14466        __struct.vz = buf.get_i16_le()?;
14467        __struct.hdg = buf.get_u16_le()?;
14468        Ok(__struct)
14469    }
14470    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14471        let mut __tmp = BytesMut::new(bytes);
14472        #[allow(clippy::absurd_extreme_comparisons)]
14473        #[allow(unused_comparisons)]
14474        if __tmp.remaining() < Self::ENCODED_LEN {
14475            panic!(
14476                "buffer is too small (need {} bytes, but got {})",
14477                Self::ENCODED_LEN,
14478                __tmp.remaining(),
14479            )
14480        }
14481        __tmp.put_u32_le(self.time_boot_ms);
14482        __tmp.put_i32_le(self.lat);
14483        __tmp.put_i32_le(self.lon);
14484        __tmp.put_i32_le(self.alt);
14485        __tmp.put_i32_le(self.relative_alt);
14486        __tmp.put_i16_le(self.vx);
14487        __tmp.put_i16_le(self.vy);
14488        __tmp.put_i16_le(self.vz);
14489        __tmp.put_u16_le(self.hdg);
14490        if matches!(version, MavlinkVersion::V2) {
14491            let len = __tmp.len();
14492            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14493        } else {
14494            __tmp.len()
14495        }
14496    }
14497}
14498#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
14499#[doc = ""]
14500#[doc = "ID: 63"]
14501#[derive(Debug, Clone, PartialEq)]
14502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14503#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14504#[cfg_attr(feature = "ts", derive(TS))]
14505#[cfg_attr(feature = "ts", ts(export))]
14506pub struct GLOBAL_POSITION_INT_COV_DATA {
14507    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14508    pub time_usec: u64,
14509    #[doc = "Latitude"]
14510    pub lat: i32,
14511    #[doc = "Longitude"]
14512    pub lon: i32,
14513    #[doc = "Altitude in meters above MSL"]
14514    pub alt: i32,
14515    #[doc = "Altitude above ground"]
14516    pub relative_alt: i32,
14517    #[doc = "Ground X Speed (Latitude)"]
14518    pub vx: f32,
14519    #[doc = "Ground Y Speed (Longitude)"]
14520    pub vy: f32,
14521    #[doc = "Ground Z Speed (Altitude)"]
14522    pub vz: f32,
14523    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
14524    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14525    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14526    pub covariance: [f32; 36],
14527    #[doc = "Class id of the estimator this estimate originated from."]
14528    pub estimator_type: MavEstimatorType,
14529}
14530impl GLOBAL_POSITION_INT_COV_DATA {
14531    pub const ENCODED_LEN: usize = 181usize;
14532    pub const DEFAULT: Self = Self {
14533        time_usec: 0_u64,
14534        lat: 0_i32,
14535        lon: 0_i32,
14536        alt: 0_i32,
14537        relative_alt: 0_i32,
14538        vx: 0.0_f32,
14539        vy: 0.0_f32,
14540        vz: 0.0_f32,
14541        covariance: [0.0_f32; 36usize],
14542        estimator_type: MavEstimatorType::DEFAULT,
14543    };
14544    #[cfg(feature = "arbitrary")]
14545    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14546        use arbitrary::{Arbitrary, Unstructured};
14547        let mut buf = [0u8; 1024];
14548        rng.fill_bytes(&mut buf);
14549        let mut unstructured = Unstructured::new(&buf);
14550        Self::arbitrary(&mut unstructured).unwrap_or_default()
14551    }
14552}
14553impl Default for GLOBAL_POSITION_INT_COV_DATA {
14554    fn default() -> Self {
14555        Self::DEFAULT.clone()
14556    }
14557}
14558impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
14559    type Message = MavMessage;
14560    const ID: u32 = 63u32;
14561    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
14562    const EXTRA_CRC: u8 = 119u8;
14563    const ENCODED_LEN: usize = 181usize;
14564    fn deser(
14565        _version: MavlinkVersion,
14566        __input: &[u8],
14567    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14568        let avail_len = __input.len();
14569        let mut payload_buf = [0; Self::ENCODED_LEN];
14570        let mut buf = if avail_len < Self::ENCODED_LEN {
14571            payload_buf[0..avail_len].copy_from_slice(__input);
14572            Bytes::new(&payload_buf)
14573        } else {
14574            Bytes::new(__input)
14575        };
14576        let mut __struct = Self::default();
14577        __struct.time_usec = buf.get_u64_le()?;
14578        __struct.lat = buf.get_i32_le()?;
14579        __struct.lon = buf.get_i32_le()?;
14580        __struct.alt = buf.get_i32_le()?;
14581        __struct.relative_alt = buf.get_i32_le()?;
14582        __struct.vx = buf.get_f32_le()?;
14583        __struct.vy = buf.get_f32_le()?;
14584        __struct.vz = buf.get_f32_le()?;
14585        for v in &mut __struct.covariance {
14586            let val = buf.get_f32_le()?;
14587            *v = val;
14588        }
14589        let tmp = buf.get_u8()?;
14590        __struct.estimator_type =
14591            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14592                enum_type: "MavEstimatorType",
14593                value: tmp as u64,
14594            })?;
14595        Ok(__struct)
14596    }
14597    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14598        let mut __tmp = BytesMut::new(bytes);
14599        #[allow(clippy::absurd_extreme_comparisons)]
14600        #[allow(unused_comparisons)]
14601        if __tmp.remaining() < Self::ENCODED_LEN {
14602            panic!(
14603                "buffer is too small (need {} bytes, but got {})",
14604                Self::ENCODED_LEN,
14605                __tmp.remaining(),
14606            )
14607        }
14608        __tmp.put_u64_le(self.time_usec);
14609        __tmp.put_i32_le(self.lat);
14610        __tmp.put_i32_le(self.lon);
14611        __tmp.put_i32_le(self.alt);
14612        __tmp.put_i32_le(self.relative_alt);
14613        __tmp.put_f32_le(self.vx);
14614        __tmp.put_f32_le(self.vy);
14615        __tmp.put_f32_le(self.vz);
14616        for val in &self.covariance {
14617            __tmp.put_f32_le(*val);
14618        }
14619        __tmp.put_u8(self.estimator_type as u8);
14620        if matches!(version, MavlinkVersion::V2) {
14621            let len = __tmp.len();
14622            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14623        } else {
14624            __tmp.len()
14625        }
14626    }
14627}
14628#[doc = "Global position/attitude estimate from a vision source."]
14629#[doc = ""]
14630#[doc = "ID: 101"]
14631#[derive(Debug, Clone, PartialEq)]
14632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14633#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14634#[cfg_attr(feature = "ts", derive(TS))]
14635#[cfg_attr(feature = "ts", ts(export))]
14636pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14637    #[doc = "Timestamp (UNIX time or since system boot)"]
14638    pub usec: u64,
14639    #[doc = "Global X position"]
14640    pub x: f32,
14641    #[doc = "Global Y position"]
14642    pub y: f32,
14643    #[doc = "Global Z position"]
14644    pub z: f32,
14645    #[doc = "Roll angle"]
14646    pub roll: f32,
14647    #[doc = "Pitch angle"]
14648    pub pitch: f32,
14649    #[doc = "Yaw angle"]
14650    pub yaw: f32,
14651    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
14652    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14653    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14654    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14655    pub covariance: [f32; 21],
14656    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
14657    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14658    pub reset_counter: u8,
14659}
14660impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14661    pub const ENCODED_LEN: usize = 117usize;
14662    pub const DEFAULT: Self = Self {
14663        usec: 0_u64,
14664        x: 0.0_f32,
14665        y: 0.0_f32,
14666        z: 0.0_f32,
14667        roll: 0.0_f32,
14668        pitch: 0.0_f32,
14669        yaw: 0.0_f32,
14670        covariance: [0.0_f32; 21usize],
14671        reset_counter: 0_u8,
14672    };
14673    #[cfg(feature = "arbitrary")]
14674    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14675        use arbitrary::{Arbitrary, Unstructured};
14676        let mut buf = [0u8; 1024];
14677        rng.fill_bytes(&mut buf);
14678        let mut unstructured = Unstructured::new(&buf);
14679        Self::arbitrary(&mut unstructured).unwrap_or_default()
14680    }
14681}
14682impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14683    fn default() -> Self {
14684        Self::DEFAULT.clone()
14685    }
14686}
14687impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14688    type Message = MavMessage;
14689    const ID: u32 = 101u32;
14690    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
14691    const EXTRA_CRC: u8 = 102u8;
14692    const ENCODED_LEN: usize = 117usize;
14693    fn deser(
14694        _version: MavlinkVersion,
14695        __input: &[u8],
14696    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14697        let avail_len = __input.len();
14698        let mut payload_buf = [0; Self::ENCODED_LEN];
14699        let mut buf = if avail_len < Self::ENCODED_LEN {
14700            payload_buf[0..avail_len].copy_from_slice(__input);
14701            Bytes::new(&payload_buf)
14702        } else {
14703            Bytes::new(__input)
14704        };
14705        let mut __struct = Self::default();
14706        __struct.usec = buf.get_u64_le()?;
14707        __struct.x = buf.get_f32_le()?;
14708        __struct.y = buf.get_f32_le()?;
14709        __struct.z = buf.get_f32_le()?;
14710        __struct.roll = buf.get_f32_le()?;
14711        __struct.pitch = buf.get_f32_le()?;
14712        __struct.yaw = buf.get_f32_le()?;
14713        for v in &mut __struct.covariance {
14714            let val = buf.get_f32_le()?;
14715            *v = val;
14716        }
14717        __struct.reset_counter = buf.get_u8()?;
14718        Ok(__struct)
14719    }
14720    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14721        let mut __tmp = BytesMut::new(bytes);
14722        #[allow(clippy::absurd_extreme_comparisons)]
14723        #[allow(unused_comparisons)]
14724        if __tmp.remaining() < Self::ENCODED_LEN {
14725            panic!(
14726                "buffer is too small (need {} bytes, but got {})",
14727                Self::ENCODED_LEN,
14728                __tmp.remaining(),
14729            )
14730        }
14731        __tmp.put_u64_le(self.usec);
14732        __tmp.put_f32_le(self.x);
14733        __tmp.put_f32_le(self.y);
14734        __tmp.put_f32_le(self.z);
14735        __tmp.put_f32_le(self.roll);
14736        __tmp.put_f32_le(self.pitch);
14737        __tmp.put_f32_le(self.yaw);
14738        if matches!(version, MavlinkVersion::V2) {
14739            for val in &self.covariance {
14740                __tmp.put_f32_le(*val);
14741            }
14742            __tmp.put_u8(self.reset_counter);
14743            let len = __tmp.len();
14744            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14745        } else {
14746            __tmp.len()
14747        }
14748    }
14749}
14750#[doc = "Second GPS data."]
14751#[doc = ""]
14752#[doc = "ID: 124"]
14753#[derive(Debug, Clone, PartialEq)]
14754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14756#[cfg_attr(feature = "ts", derive(TS))]
14757#[cfg_attr(feature = "ts", ts(export))]
14758pub struct GPS2_RAW_DATA {
14759    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14760    pub time_usec: u64,
14761    #[doc = "Latitude (WGS84)"]
14762    pub lat: i32,
14763    #[doc = "Longitude (WGS84)"]
14764    pub lon: i32,
14765    #[doc = "Altitude (MSL). Positive for up."]
14766    pub alt: i32,
14767    #[doc = "Age of DGPS info"]
14768    pub dgps_age: u32,
14769    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14770    pub eph: u16,
14771    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14772    pub epv: u16,
14773    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14774    pub vel: u16,
14775    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14776    pub cog: u16,
14777    #[doc = "GPS fix type."]
14778    pub fix_type: GpsFixType,
14779    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14780    pub satellites_visible: u8,
14781    #[doc = "Number of DGPS satellites"]
14782    pub dgps_numch: u8,
14783    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14784    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14785    pub yaw: u16,
14786    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14787    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14788    pub alt_ellipsoid: i32,
14789    #[doc = "Position uncertainty."]
14790    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14791    pub h_acc: u32,
14792    #[doc = "Altitude uncertainty."]
14793    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14794    pub v_acc: u32,
14795    #[doc = "Speed uncertainty."]
14796    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14797    pub vel_acc: u32,
14798    #[doc = "Heading / track uncertainty"]
14799    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14800    pub hdg_acc: u32,
14801}
14802impl GPS2_RAW_DATA {
14803    pub const ENCODED_LEN: usize = 57usize;
14804    pub const DEFAULT: Self = Self {
14805        time_usec: 0_u64,
14806        lat: 0_i32,
14807        lon: 0_i32,
14808        alt: 0_i32,
14809        dgps_age: 0_u32,
14810        eph: 0_u16,
14811        epv: 0_u16,
14812        vel: 0_u16,
14813        cog: 0_u16,
14814        fix_type: GpsFixType::DEFAULT,
14815        satellites_visible: 0_u8,
14816        dgps_numch: 0_u8,
14817        yaw: 0_u16,
14818        alt_ellipsoid: 0_i32,
14819        h_acc: 0_u32,
14820        v_acc: 0_u32,
14821        vel_acc: 0_u32,
14822        hdg_acc: 0_u32,
14823    };
14824    #[cfg(feature = "arbitrary")]
14825    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14826        use arbitrary::{Arbitrary, Unstructured};
14827        let mut buf = [0u8; 1024];
14828        rng.fill_bytes(&mut buf);
14829        let mut unstructured = Unstructured::new(&buf);
14830        Self::arbitrary(&mut unstructured).unwrap_or_default()
14831    }
14832}
14833impl Default for GPS2_RAW_DATA {
14834    fn default() -> Self {
14835        Self::DEFAULT.clone()
14836    }
14837}
14838impl MessageData for GPS2_RAW_DATA {
14839    type Message = MavMessage;
14840    const ID: u32 = 124u32;
14841    const NAME: &'static str = "GPS2_RAW";
14842    const EXTRA_CRC: u8 = 87u8;
14843    const ENCODED_LEN: usize = 57usize;
14844    fn deser(
14845        _version: MavlinkVersion,
14846        __input: &[u8],
14847    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14848        let avail_len = __input.len();
14849        let mut payload_buf = [0; Self::ENCODED_LEN];
14850        let mut buf = if avail_len < Self::ENCODED_LEN {
14851            payload_buf[0..avail_len].copy_from_slice(__input);
14852            Bytes::new(&payload_buf)
14853        } else {
14854            Bytes::new(__input)
14855        };
14856        let mut __struct = Self::default();
14857        __struct.time_usec = buf.get_u64_le()?;
14858        __struct.lat = buf.get_i32_le()?;
14859        __struct.lon = buf.get_i32_le()?;
14860        __struct.alt = buf.get_i32_le()?;
14861        __struct.dgps_age = buf.get_u32_le()?;
14862        __struct.eph = buf.get_u16_le()?;
14863        __struct.epv = buf.get_u16_le()?;
14864        __struct.vel = buf.get_u16_le()?;
14865        __struct.cog = buf.get_u16_le()?;
14866        let tmp = buf.get_u8()?;
14867        __struct.fix_type =
14868            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14869                enum_type: "GpsFixType",
14870                value: tmp as u64,
14871            })?;
14872        __struct.satellites_visible = buf.get_u8()?;
14873        __struct.dgps_numch = buf.get_u8()?;
14874        __struct.yaw = buf.get_u16_le()?;
14875        __struct.alt_ellipsoid = buf.get_i32_le()?;
14876        __struct.h_acc = buf.get_u32_le()?;
14877        __struct.v_acc = buf.get_u32_le()?;
14878        __struct.vel_acc = buf.get_u32_le()?;
14879        __struct.hdg_acc = buf.get_u32_le()?;
14880        Ok(__struct)
14881    }
14882    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14883        let mut __tmp = BytesMut::new(bytes);
14884        #[allow(clippy::absurd_extreme_comparisons)]
14885        #[allow(unused_comparisons)]
14886        if __tmp.remaining() < Self::ENCODED_LEN {
14887            panic!(
14888                "buffer is too small (need {} bytes, but got {})",
14889                Self::ENCODED_LEN,
14890                __tmp.remaining(),
14891            )
14892        }
14893        __tmp.put_u64_le(self.time_usec);
14894        __tmp.put_i32_le(self.lat);
14895        __tmp.put_i32_le(self.lon);
14896        __tmp.put_i32_le(self.alt);
14897        __tmp.put_u32_le(self.dgps_age);
14898        __tmp.put_u16_le(self.eph);
14899        __tmp.put_u16_le(self.epv);
14900        __tmp.put_u16_le(self.vel);
14901        __tmp.put_u16_le(self.cog);
14902        __tmp.put_u8(self.fix_type as u8);
14903        __tmp.put_u8(self.satellites_visible);
14904        __tmp.put_u8(self.dgps_numch);
14905        if matches!(version, MavlinkVersion::V2) {
14906            __tmp.put_u16_le(self.yaw);
14907            __tmp.put_i32_le(self.alt_ellipsoid);
14908            __tmp.put_u32_le(self.h_acc);
14909            __tmp.put_u32_le(self.v_acc);
14910            __tmp.put_u32_le(self.vel_acc);
14911            __tmp.put_u32_le(self.hdg_acc);
14912            let len = __tmp.len();
14913            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14914        } else {
14915            __tmp.len()
14916        }
14917    }
14918}
14919#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14920#[doc = ""]
14921#[doc = "ID: 128"]
14922#[derive(Debug, Clone, PartialEq)]
14923#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14924#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14925#[cfg_attr(feature = "ts", derive(TS))]
14926#[cfg_attr(feature = "ts", ts(export))]
14927pub struct GPS2_RTK_DATA {
14928    #[doc = "Time since boot of last baseline message received."]
14929    pub time_last_baseline_ms: u32,
14930    #[doc = "GPS Time of Week of last baseline"]
14931    pub tow: u32,
14932    #[doc = "Current baseline in ECEF x or NED north component."]
14933    pub baseline_a_mm: i32,
14934    #[doc = "Current baseline in ECEF y or NED east component."]
14935    pub baseline_b_mm: i32,
14936    #[doc = "Current baseline in ECEF z or NED down component."]
14937    pub baseline_c_mm: i32,
14938    #[doc = "Current estimate of baseline accuracy."]
14939    pub accuracy: u32,
14940    #[doc = "Current number of integer ambiguity hypotheses."]
14941    pub iar_num_hypotheses: i32,
14942    #[doc = "GPS Week Number of last baseline"]
14943    pub wn: u16,
14944    #[doc = "Identification of connected RTK receiver."]
14945    pub rtk_receiver_id: u8,
14946    #[doc = "GPS-specific health report for RTK data."]
14947    pub rtk_health: u8,
14948    #[doc = "Rate of baseline messages being received by GPS"]
14949    pub rtk_rate: u8,
14950    #[doc = "Current number of sats used for RTK calculation."]
14951    pub nsats: u8,
14952    #[doc = "Coordinate system of baseline"]
14953    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14954}
14955impl GPS2_RTK_DATA {
14956    pub const ENCODED_LEN: usize = 35usize;
14957    pub const DEFAULT: Self = Self {
14958        time_last_baseline_ms: 0_u32,
14959        tow: 0_u32,
14960        baseline_a_mm: 0_i32,
14961        baseline_b_mm: 0_i32,
14962        baseline_c_mm: 0_i32,
14963        accuracy: 0_u32,
14964        iar_num_hypotheses: 0_i32,
14965        wn: 0_u16,
14966        rtk_receiver_id: 0_u8,
14967        rtk_health: 0_u8,
14968        rtk_rate: 0_u8,
14969        nsats: 0_u8,
14970        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14971    };
14972    #[cfg(feature = "arbitrary")]
14973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14974        use arbitrary::{Arbitrary, Unstructured};
14975        let mut buf = [0u8; 1024];
14976        rng.fill_bytes(&mut buf);
14977        let mut unstructured = Unstructured::new(&buf);
14978        Self::arbitrary(&mut unstructured).unwrap_or_default()
14979    }
14980}
14981impl Default for GPS2_RTK_DATA {
14982    fn default() -> Self {
14983        Self::DEFAULT.clone()
14984    }
14985}
14986impl MessageData for GPS2_RTK_DATA {
14987    type Message = MavMessage;
14988    const ID: u32 = 128u32;
14989    const NAME: &'static str = "GPS2_RTK";
14990    const EXTRA_CRC: u8 = 226u8;
14991    const ENCODED_LEN: usize = 35usize;
14992    fn deser(
14993        _version: MavlinkVersion,
14994        __input: &[u8],
14995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14996        let avail_len = __input.len();
14997        let mut payload_buf = [0; Self::ENCODED_LEN];
14998        let mut buf = if avail_len < Self::ENCODED_LEN {
14999            payload_buf[0..avail_len].copy_from_slice(__input);
15000            Bytes::new(&payload_buf)
15001        } else {
15002            Bytes::new(__input)
15003        };
15004        let mut __struct = Self::default();
15005        __struct.time_last_baseline_ms = buf.get_u32_le()?;
15006        __struct.tow = buf.get_u32_le()?;
15007        __struct.baseline_a_mm = buf.get_i32_le()?;
15008        __struct.baseline_b_mm = buf.get_i32_le()?;
15009        __struct.baseline_c_mm = buf.get_i32_le()?;
15010        __struct.accuracy = buf.get_u32_le()?;
15011        __struct.iar_num_hypotheses = buf.get_i32_le()?;
15012        __struct.wn = buf.get_u16_le()?;
15013        __struct.rtk_receiver_id = buf.get_u8()?;
15014        __struct.rtk_health = buf.get_u8()?;
15015        __struct.rtk_rate = buf.get_u8()?;
15016        __struct.nsats = buf.get_u8()?;
15017        let tmp = buf.get_u8()?;
15018        __struct.baseline_coords_type =
15019            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15020                enum_type: "RtkBaselineCoordinateSystem",
15021                value: tmp as u64,
15022            })?;
15023        Ok(__struct)
15024    }
15025    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15026        let mut __tmp = BytesMut::new(bytes);
15027        #[allow(clippy::absurd_extreme_comparisons)]
15028        #[allow(unused_comparisons)]
15029        if __tmp.remaining() < Self::ENCODED_LEN {
15030            panic!(
15031                "buffer is too small (need {} bytes, but got {})",
15032                Self::ENCODED_LEN,
15033                __tmp.remaining(),
15034            )
15035        }
15036        __tmp.put_u32_le(self.time_last_baseline_ms);
15037        __tmp.put_u32_le(self.tow);
15038        __tmp.put_i32_le(self.baseline_a_mm);
15039        __tmp.put_i32_le(self.baseline_b_mm);
15040        __tmp.put_i32_le(self.baseline_c_mm);
15041        __tmp.put_u32_le(self.accuracy);
15042        __tmp.put_i32_le(self.iar_num_hypotheses);
15043        __tmp.put_u16_le(self.wn);
15044        __tmp.put_u8(self.rtk_receiver_id);
15045        __tmp.put_u8(self.rtk_health);
15046        __tmp.put_u8(self.rtk_rate);
15047        __tmp.put_u8(self.nsats);
15048        __tmp.put_u8(self.baseline_coords_type as u8);
15049        if matches!(version, MavlinkVersion::V2) {
15050            let len = __tmp.len();
15051            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15052        } else {
15053            __tmp.len()
15054        }
15055    }
15056}
15057#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
15058#[doc = ""]
15059#[doc = "ID: 49"]
15060#[derive(Debug, Clone, PartialEq)]
15061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15063#[cfg_attr(feature = "ts", derive(TS))]
15064#[cfg_attr(feature = "ts", ts(export))]
15065pub struct GPS_GLOBAL_ORIGIN_DATA {
15066    #[doc = "Latitude (WGS84)"]
15067    pub latitude: i32,
15068    #[doc = "Longitude (WGS84)"]
15069    pub longitude: i32,
15070    #[doc = "Altitude (MSL). Positive for up."]
15071    pub altitude: i32,
15072    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15073    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15074    pub time_usec: u64,
15075}
15076impl GPS_GLOBAL_ORIGIN_DATA {
15077    pub const ENCODED_LEN: usize = 20usize;
15078    pub const DEFAULT: Self = Self {
15079        latitude: 0_i32,
15080        longitude: 0_i32,
15081        altitude: 0_i32,
15082        time_usec: 0_u64,
15083    };
15084    #[cfg(feature = "arbitrary")]
15085    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15086        use arbitrary::{Arbitrary, Unstructured};
15087        let mut buf = [0u8; 1024];
15088        rng.fill_bytes(&mut buf);
15089        let mut unstructured = Unstructured::new(&buf);
15090        Self::arbitrary(&mut unstructured).unwrap_or_default()
15091    }
15092}
15093impl Default for GPS_GLOBAL_ORIGIN_DATA {
15094    fn default() -> Self {
15095        Self::DEFAULT.clone()
15096    }
15097}
15098impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
15099    type Message = MavMessage;
15100    const ID: u32 = 49u32;
15101    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
15102    const EXTRA_CRC: u8 = 39u8;
15103    const ENCODED_LEN: usize = 20usize;
15104    fn deser(
15105        _version: MavlinkVersion,
15106        __input: &[u8],
15107    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15108        let avail_len = __input.len();
15109        let mut payload_buf = [0; Self::ENCODED_LEN];
15110        let mut buf = if avail_len < Self::ENCODED_LEN {
15111            payload_buf[0..avail_len].copy_from_slice(__input);
15112            Bytes::new(&payload_buf)
15113        } else {
15114            Bytes::new(__input)
15115        };
15116        let mut __struct = Self::default();
15117        __struct.latitude = buf.get_i32_le()?;
15118        __struct.longitude = buf.get_i32_le()?;
15119        __struct.altitude = buf.get_i32_le()?;
15120        __struct.time_usec = buf.get_u64_le()?;
15121        Ok(__struct)
15122    }
15123    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15124        let mut __tmp = BytesMut::new(bytes);
15125        #[allow(clippy::absurd_extreme_comparisons)]
15126        #[allow(unused_comparisons)]
15127        if __tmp.remaining() < Self::ENCODED_LEN {
15128            panic!(
15129                "buffer is too small (need {} bytes, but got {})",
15130                Self::ENCODED_LEN,
15131                __tmp.remaining(),
15132            )
15133        }
15134        __tmp.put_i32_le(self.latitude);
15135        __tmp.put_i32_le(self.longitude);
15136        __tmp.put_i32_le(self.altitude);
15137        if matches!(version, MavlinkVersion::V2) {
15138            __tmp.put_u64_le(self.time_usec);
15139            let len = __tmp.len();
15140            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15141        } else {
15142            __tmp.len()
15143        }
15144    }
15145}
15146#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
15147#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
15148#[doc = ""]
15149#[doc = "ID: 123"]
15150#[derive(Debug, Clone, PartialEq)]
15151#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15152#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15153#[cfg_attr(feature = "ts", derive(TS))]
15154#[cfg_attr(feature = "ts", ts(export))]
15155pub struct GPS_INJECT_DATA_DATA {
15156    #[doc = "System ID"]
15157    pub target_system: u8,
15158    #[doc = "Component ID"]
15159    pub target_component: u8,
15160    #[doc = "Data length"]
15161    pub len: u8,
15162    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
15163    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15164    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15165    pub data: [u8; 110],
15166}
15167impl GPS_INJECT_DATA_DATA {
15168    pub const ENCODED_LEN: usize = 113usize;
15169    pub const DEFAULT: Self = Self {
15170        target_system: 0_u8,
15171        target_component: 0_u8,
15172        len: 0_u8,
15173        data: [0_u8; 110usize],
15174    };
15175    #[cfg(feature = "arbitrary")]
15176    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15177        use arbitrary::{Arbitrary, Unstructured};
15178        let mut buf = [0u8; 1024];
15179        rng.fill_bytes(&mut buf);
15180        let mut unstructured = Unstructured::new(&buf);
15181        Self::arbitrary(&mut unstructured).unwrap_or_default()
15182    }
15183}
15184impl Default for GPS_INJECT_DATA_DATA {
15185    fn default() -> Self {
15186        Self::DEFAULT.clone()
15187    }
15188}
15189impl MessageData for GPS_INJECT_DATA_DATA {
15190    type Message = MavMessage;
15191    const ID: u32 = 123u32;
15192    const NAME: &'static str = "GPS_INJECT_DATA";
15193    const EXTRA_CRC: u8 = 250u8;
15194    const ENCODED_LEN: usize = 113usize;
15195    fn deser(
15196        _version: MavlinkVersion,
15197        __input: &[u8],
15198    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15199        let avail_len = __input.len();
15200        let mut payload_buf = [0; Self::ENCODED_LEN];
15201        let mut buf = if avail_len < Self::ENCODED_LEN {
15202            payload_buf[0..avail_len].copy_from_slice(__input);
15203            Bytes::new(&payload_buf)
15204        } else {
15205            Bytes::new(__input)
15206        };
15207        let mut __struct = Self::default();
15208        __struct.target_system = buf.get_u8()?;
15209        __struct.target_component = buf.get_u8()?;
15210        __struct.len = buf.get_u8()?;
15211        for v in &mut __struct.data {
15212            let val = buf.get_u8()?;
15213            *v = val;
15214        }
15215        Ok(__struct)
15216    }
15217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15218        let mut __tmp = BytesMut::new(bytes);
15219        #[allow(clippy::absurd_extreme_comparisons)]
15220        #[allow(unused_comparisons)]
15221        if __tmp.remaining() < Self::ENCODED_LEN {
15222            panic!(
15223                "buffer is too small (need {} bytes, but got {})",
15224                Self::ENCODED_LEN,
15225                __tmp.remaining(),
15226            )
15227        }
15228        __tmp.put_u8(self.target_system);
15229        __tmp.put_u8(self.target_component);
15230        __tmp.put_u8(self.len);
15231        for val in &self.data {
15232            __tmp.put_u8(*val);
15233        }
15234        if matches!(version, MavlinkVersion::V2) {
15235            let len = __tmp.len();
15236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15237        } else {
15238            __tmp.len()
15239        }
15240    }
15241}
15242#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
15243#[doc = ""]
15244#[doc = "ID: 232"]
15245#[derive(Debug, Clone, PartialEq)]
15246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15248#[cfg_attr(feature = "ts", derive(TS))]
15249#[cfg_attr(feature = "ts", ts(export))]
15250pub struct GPS_INPUT_DATA {
15251    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15252    pub time_usec: u64,
15253    #[doc = "GPS time (from start of GPS week)"]
15254    pub time_week_ms: u32,
15255    #[doc = "Latitude (WGS84)"]
15256    pub lat: i32,
15257    #[doc = "Longitude (WGS84)"]
15258    pub lon: i32,
15259    #[doc = "Altitude (MSL). Positive for up."]
15260    pub alt: f32,
15261    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
15262    pub hdop: f32,
15263    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
15264    pub vdop: f32,
15265    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15266    pub vn: f32,
15267    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15268    pub ve: f32,
15269    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15270    pub vd: f32,
15271    #[doc = "GPS speed accuracy"]
15272    pub speed_accuracy: f32,
15273    #[doc = "GPS horizontal accuracy"]
15274    pub horiz_accuracy: f32,
15275    #[doc = "GPS vertical accuracy"]
15276    pub vert_accuracy: f32,
15277    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
15278    pub ignore_flags: GpsInputIgnoreFlags,
15279    #[doc = "GPS week number"]
15280    pub time_week: u16,
15281    #[doc = "ID of the GPS for multiple GPS inputs"]
15282    pub gps_id: u8,
15283    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
15284    pub fix_type: u8,
15285    #[doc = "Number of satellites visible."]
15286    pub satellites_visible: u8,
15287    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15288    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15289    pub yaw: u16,
15290}
15291impl GPS_INPUT_DATA {
15292    pub const ENCODED_LEN: usize = 65usize;
15293    pub const DEFAULT: Self = Self {
15294        time_usec: 0_u64,
15295        time_week_ms: 0_u32,
15296        lat: 0_i32,
15297        lon: 0_i32,
15298        alt: 0.0_f32,
15299        hdop: 0.0_f32,
15300        vdop: 0.0_f32,
15301        vn: 0.0_f32,
15302        ve: 0.0_f32,
15303        vd: 0.0_f32,
15304        speed_accuracy: 0.0_f32,
15305        horiz_accuracy: 0.0_f32,
15306        vert_accuracy: 0.0_f32,
15307        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
15308        time_week: 0_u16,
15309        gps_id: 0_u8,
15310        fix_type: 0_u8,
15311        satellites_visible: 0_u8,
15312        yaw: 0_u16,
15313    };
15314    #[cfg(feature = "arbitrary")]
15315    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15316        use arbitrary::{Arbitrary, Unstructured};
15317        let mut buf = [0u8; 1024];
15318        rng.fill_bytes(&mut buf);
15319        let mut unstructured = Unstructured::new(&buf);
15320        Self::arbitrary(&mut unstructured).unwrap_or_default()
15321    }
15322}
15323impl Default for GPS_INPUT_DATA {
15324    fn default() -> Self {
15325        Self::DEFAULT.clone()
15326    }
15327}
15328impl MessageData for GPS_INPUT_DATA {
15329    type Message = MavMessage;
15330    const ID: u32 = 232u32;
15331    const NAME: &'static str = "GPS_INPUT";
15332    const EXTRA_CRC: u8 = 151u8;
15333    const ENCODED_LEN: usize = 65usize;
15334    fn deser(
15335        _version: MavlinkVersion,
15336        __input: &[u8],
15337    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15338        let avail_len = __input.len();
15339        let mut payload_buf = [0; Self::ENCODED_LEN];
15340        let mut buf = if avail_len < Self::ENCODED_LEN {
15341            payload_buf[0..avail_len].copy_from_slice(__input);
15342            Bytes::new(&payload_buf)
15343        } else {
15344            Bytes::new(__input)
15345        };
15346        let mut __struct = Self::default();
15347        __struct.time_usec = buf.get_u64_le()?;
15348        __struct.time_week_ms = buf.get_u32_le()?;
15349        __struct.lat = buf.get_i32_le()?;
15350        __struct.lon = buf.get_i32_le()?;
15351        __struct.alt = buf.get_f32_le()?;
15352        __struct.hdop = buf.get_f32_le()?;
15353        __struct.vdop = buf.get_f32_le()?;
15354        __struct.vn = buf.get_f32_le()?;
15355        __struct.ve = buf.get_f32_le()?;
15356        __struct.vd = buf.get_f32_le()?;
15357        __struct.speed_accuracy = buf.get_f32_le()?;
15358        __struct.horiz_accuracy = buf.get_f32_le()?;
15359        __struct.vert_accuracy = buf.get_f32_le()?;
15360        let tmp = buf.get_u16_le()?;
15361        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
15362            tmp as <GpsInputIgnoreFlags as Flags>::Bits,
15363        )
15364        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15365            flag_type: "GpsInputIgnoreFlags",
15366            value: tmp as u64,
15367        })?;
15368        __struct.time_week = buf.get_u16_le()?;
15369        __struct.gps_id = buf.get_u8()?;
15370        __struct.fix_type = buf.get_u8()?;
15371        __struct.satellites_visible = buf.get_u8()?;
15372        __struct.yaw = buf.get_u16_le()?;
15373        Ok(__struct)
15374    }
15375    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15376        let mut __tmp = BytesMut::new(bytes);
15377        #[allow(clippy::absurd_extreme_comparisons)]
15378        #[allow(unused_comparisons)]
15379        if __tmp.remaining() < Self::ENCODED_LEN {
15380            panic!(
15381                "buffer is too small (need {} bytes, but got {})",
15382                Self::ENCODED_LEN,
15383                __tmp.remaining(),
15384            )
15385        }
15386        __tmp.put_u64_le(self.time_usec);
15387        __tmp.put_u32_le(self.time_week_ms);
15388        __tmp.put_i32_le(self.lat);
15389        __tmp.put_i32_le(self.lon);
15390        __tmp.put_f32_le(self.alt);
15391        __tmp.put_f32_le(self.hdop);
15392        __tmp.put_f32_le(self.vdop);
15393        __tmp.put_f32_le(self.vn);
15394        __tmp.put_f32_le(self.ve);
15395        __tmp.put_f32_le(self.vd);
15396        __tmp.put_f32_le(self.speed_accuracy);
15397        __tmp.put_f32_le(self.horiz_accuracy);
15398        __tmp.put_f32_le(self.vert_accuracy);
15399        __tmp.put_u16_le(self.ignore_flags.bits() as u16);
15400        __tmp.put_u16_le(self.time_week);
15401        __tmp.put_u8(self.gps_id);
15402        __tmp.put_u8(self.fix_type);
15403        __tmp.put_u8(self.satellites_visible);
15404        if matches!(version, MavlinkVersion::V2) {
15405            __tmp.put_u16_le(self.yaw);
15406            let len = __tmp.len();
15407            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15408        } else {
15409            __tmp.len()
15410        }
15411    }
15412}
15413#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15414#[doc = ""]
15415#[doc = "ID: 24"]
15416#[derive(Debug, Clone, PartialEq)]
15417#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15418#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15419#[cfg_attr(feature = "ts", derive(TS))]
15420#[cfg_attr(feature = "ts", ts(export))]
15421pub struct GPS_RAW_INT_DATA {
15422    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15423    pub time_usec: u64,
15424    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
15425    pub lat: i32,
15426    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
15427    pub lon: i32,
15428    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
15429    pub alt: i32,
15430    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15431    pub eph: u16,
15432    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15433    pub epv: u16,
15434    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15435    pub vel: u16,
15436    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15437    pub cog: u16,
15438    #[doc = "GPS fix type."]
15439    pub fix_type: GpsFixType,
15440    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15441    pub satellites_visible: u8,
15442    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
15443    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15444    pub alt_ellipsoid: i32,
15445    #[doc = "Position uncertainty."]
15446    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15447    pub h_acc: u32,
15448    #[doc = "Altitude uncertainty."]
15449    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15450    pub v_acc: u32,
15451    #[doc = "Speed uncertainty."]
15452    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15453    pub vel_acc: u32,
15454    #[doc = "Heading / track uncertainty"]
15455    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15456    pub hdg_acc: u32,
15457    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
15458    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15459    pub yaw: u16,
15460}
15461impl GPS_RAW_INT_DATA {
15462    pub const ENCODED_LEN: usize = 52usize;
15463    pub const DEFAULT: Self = Self {
15464        time_usec: 0_u64,
15465        lat: 0_i32,
15466        lon: 0_i32,
15467        alt: 0_i32,
15468        eph: 0_u16,
15469        epv: 0_u16,
15470        vel: 0_u16,
15471        cog: 0_u16,
15472        fix_type: GpsFixType::DEFAULT,
15473        satellites_visible: 0_u8,
15474        alt_ellipsoid: 0_i32,
15475        h_acc: 0_u32,
15476        v_acc: 0_u32,
15477        vel_acc: 0_u32,
15478        hdg_acc: 0_u32,
15479        yaw: 0_u16,
15480    };
15481    #[cfg(feature = "arbitrary")]
15482    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15483        use arbitrary::{Arbitrary, Unstructured};
15484        let mut buf = [0u8; 1024];
15485        rng.fill_bytes(&mut buf);
15486        let mut unstructured = Unstructured::new(&buf);
15487        Self::arbitrary(&mut unstructured).unwrap_or_default()
15488    }
15489}
15490impl Default for GPS_RAW_INT_DATA {
15491    fn default() -> Self {
15492        Self::DEFAULT.clone()
15493    }
15494}
15495impl MessageData for GPS_RAW_INT_DATA {
15496    type Message = MavMessage;
15497    const ID: u32 = 24u32;
15498    const NAME: &'static str = "GPS_RAW_INT";
15499    const EXTRA_CRC: u8 = 24u8;
15500    const ENCODED_LEN: usize = 52usize;
15501    fn deser(
15502        _version: MavlinkVersion,
15503        __input: &[u8],
15504    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15505        let avail_len = __input.len();
15506        let mut payload_buf = [0; Self::ENCODED_LEN];
15507        let mut buf = if avail_len < Self::ENCODED_LEN {
15508            payload_buf[0..avail_len].copy_from_slice(__input);
15509            Bytes::new(&payload_buf)
15510        } else {
15511            Bytes::new(__input)
15512        };
15513        let mut __struct = Self::default();
15514        __struct.time_usec = buf.get_u64_le()?;
15515        __struct.lat = buf.get_i32_le()?;
15516        __struct.lon = buf.get_i32_le()?;
15517        __struct.alt = buf.get_i32_le()?;
15518        __struct.eph = buf.get_u16_le()?;
15519        __struct.epv = buf.get_u16_le()?;
15520        __struct.vel = buf.get_u16_le()?;
15521        __struct.cog = buf.get_u16_le()?;
15522        let tmp = buf.get_u8()?;
15523        __struct.fix_type =
15524            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15525                enum_type: "GpsFixType",
15526                value: tmp as u64,
15527            })?;
15528        __struct.satellites_visible = buf.get_u8()?;
15529        __struct.alt_ellipsoid = buf.get_i32_le()?;
15530        __struct.h_acc = buf.get_u32_le()?;
15531        __struct.v_acc = buf.get_u32_le()?;
15532        __struct.vel_acc = buf.get_u32_le()?;
15533        __struct.hdg_acc = buf.get_u32_le()?;
15534        __struct.yaw = buf.get_u16_le()?;
15535        Ok(__struct)
15536    }
15537    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15538        let mut __tmp = BytesMut::new(bytes);
15539        #[allow(clippy::absurd_extreme_comparisons)]
15540        #[allow(unused_comparisons)]
15541        if __tmp.remaining() < Self::ENCODED_LEN {
15542            panic!(
15543                "buffer is too small (need {} bytes, but got {})",
15544                Self::ENCODED_LEN,
15545                __tmp.remaining(),
15546            )
15547        }
15548        __tmp.put_u64_le(self.time_usec);
15549        __tmp.put_i32_le(self.lat);
15550        __tmp.put_i32_le(self.lon);
15551        __tmp.put_i32_le(self.alt);
15552        __tmp.put_u16_le(self.eph);
15553        __tmp.put_u16_le(self.epv);
15554        __tmp.put_u16_le(self.vel);
15555        __tmp.put_u16_le(self.cog);
15556        __tmp.put_u8(self.fix_type as u8);
15557        __tmp.put_u8(self.satellites_visible);
15558        if matches!(version, MavlinkVersion::V2) {
15559            __tmp.put_i32_le(self.alt_ellipsoid);
15560            __tmp.put_u32_le(self.h_acc);
15561            __tmp.put_u32_le(self.v_acc);
15562            __tmp.put_u32_le(self.vel_acc);
15563            __tmp.put_u32_le(self.hdg_acc);
15564            __tmp.put_u16_le(self.yaw);
15565            let len = __tmp.len();
15566            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15567        } else {
15568            __tmp.len()
15569        }
15570    }
15571}
15572#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
15573#[doc = ""]
15574#[doc = "ID: 233"]
15575#[derive(Debug, Clone, PartialEq)]
15576#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15577#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15578#[cfg_attr(feature = "ts", derive(TS))]
15579#[cfg_attr(feature = "ts", ts(export))]
15580pub struct GPS_RTCM_DATA_DATA {
15581    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
15582    pub flags: u8,
15583    #[doc = "data length"]
15584    pub len: u8,
15585    #[doc = "RTCM message (may be fragmented)"]
15586    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15587    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15588    pub data: [u8; 180],
15589}
15590impl GPS_RTCM_DATA_DATA {
15591    pub const ENCODED_LEN: usize = 182usize;
15592    pub const DEFAULT: Self = Self {
15593        flags: 0_u8,
15594        len: 0_u8,
15595        data: [0_u8; 180usize],
15596    };
15597    #[cfg(feature = "arbitrary")]
15598    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15599        use arbitrary::{Arbitrary, Unstructured};
15600        let mut buf = [0u8; 1024];
15601        rng.fill_bytes(&mut buf);
15602        let mut unstructured = Unstructured::new(&buf);
15603        Self::arbitrary(&mut unstructured).unwrap_or_default()
15604    }
15605}
15606impl Default for GPS_RTCM_DATA_DATA {
15607    fn default() -> Self {
15608        Self::DEFAULT.clone()
15609    }
15610}
15611impl MessageData for GPS_RTCM_DATA_DATA {
15612    type Message = MavMessage;
15613    const ID: u32 = 233u32;
15614    const NAME: &'static str = "GPS_RTCM_DATA";
15615    const EXTRA_CRC: u8 = 35u8;
15616    const ENCODED_LEN: usize = 182usize;
15617    fn deser(
15618        _version: MavlinkVersion,
15619        __input: &[u8],
15620    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15621        let avail_len = __input.len();
15622        let mut payload_buf = [0; Self::ENCODED_LEN];
15623        let mut buf = if avail_len < Self::ENCODED_LEN {
15624            payload_buf[0..avail_len].copy_from_slice(__input);
15625            Bytes::new(&payload_buf)
15626        } else {
15627            Bytes::new(__input)
15628        };
15629        let mut __struct = Self::default();
15630        __struct.flags = buf.get_u8()?;
15631        __struct.len = buf.get_u8()?;
15632        for v in &mut __struct.data {
15633            let val = buf.get_u8()?;
15634            *v = val;
15635        }
15636        Ok(__struct)
15637    }
15638    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15639        let mut __tmp = BytesMut::new(bytes);
15640        #[allow(clippy::absurd_extreme_comparisons)]
15641        #[allow(unused_comparisons)]
15642        if __tmp.remaining() < Self::ENCODED_LEN {
15643            panic!(
15644                "buffer is too small (need {} bytes, but got {})",
15645                Self::ENCODED_LEN,
15646                __tmp.remaining(),
15647            )
15648        }
15649        __tmp.put_u8(self.flags);
15650        __tmp.put_u8(self.len);
15651        for val in &self.data {
15652            __tmp.put_u8(*val);
15653        }
15654        if matches!(version, MavlinkVersion::V2) {
15655            let len = __tmp.len();
15656            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15657        } else {
15658            __tmp.len()
15659        }
15660    }
15661}
15662#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
15663#[doc = ""]
15664#[doc = "ID: 127"]
15665#[derive(Debug, Clone, PartialEq)]
15666#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15667#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15668#[cfg_attr(feature = "ts", derive(TS))]
15669#[cfg_attr(feature = "ts", ts(export))]
15670pub struct GPS_RTK_DATA {
15671    #[doc = "Time since boot of last baseline message received."]
15672    pub time_last_baseline_ms: u32,
15673    #[doc = "GPS Time of Week of last baseline"]
15674    pub tow: u32,
15675    #[doc = "Current baseline in ECEF x or NED north component."]
15676    pub baseline_a_mm: i32,
15677    #[doc = "Current baseline in ECEF y or NED east component."]
15678    pub baseline_b_mm: i32,
15679    #[doc = "Current baseline in ECEF z or NED down component."]
15680    pub baseline_c_mm: i32,
15681    #[doc = "Current estimate of baseline accuracy."]
15682    pub accuracy: u32,
15683    #[doc = "Current number of integer ambiguity hypotheses."]
15684    pub iar_num_hypotheses: i32,
15685    #[doc = "GPS Week Number of last baseline"]
15686    pub wn: u16,
15687    #[doc = "Identification of connected RTK receiver."]
15688    pub rtk_receiver_id: u8,
15689    #[doc = "GPS-specific health report for RTK data."]
15690    pub rtk_health: u8,
15691    #[doc = "Rate of baseline messages being received by GPS"]
15692    pub rtk_rate: u8,
15693    #[doc = "Current number of sats used for RTK calculation."]
15694    pub nsats: u8,
15695    #[doc = "Coordinate system of baseline"]
15696    pub baseline_coords_type: RtkBaselineCoordinateSystem,
15697}
15698impl GPS_RTK_DATA {
15699    pub const ENCODED_LEN: usize = 35usize;
15700    pub const DEFAULT: Self = Self {
15701        time_last_baseline_ms: 0_u32,
15702        tow: 0_u32,
15703        baseline_a_mm: 0_i32,
15704        baseline_b_mm: 0_i32,
15705        baseline_c_mm: 0_i32,
15706        accuracy: 0_u32,
15707        iar_num_hypotheses: 0_i32,
15708        wn: 0_u16,
15709        rtk_receiver_id: 0_u8,
15710        rtk_health: 0_u8,
15711        rtk_rate: 0_u8,
15712        nsats: 0_u8,
15713        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15714    };
15715    #[cfg(feature = "arbitrary")]
15716    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15717        use arbitrary::{Arbitrary, Unstructured};
15718        let mut buf = [0u8; 1024];
15719        rng.fill_bytes(&mut buf);
15720        let mut unstructured = Unstructured::new(&buf);
15721        Self::arbitrary(&mut unstructured).unwrap_or_default()
15722    }
15723}
15724impl Default for GPS_RTK_DATA {
15725    fn default() -> Self {
15726        Self::DEFAULT.clone()
15727    }
15728}
15729impl MessageData for GPS_RTK_DATA {
15730    type Message = MavMessage;
15731    const ID: u32 = 127u32;
15732    const NAME: &'static str = "GPS_RTK";
15733    const EXTRA_CRC: u8 = 25u8;
15734    const ENCODED_LEN: usize = 35usize;
15735    fn deser(
15736        _version: MavlinkVersion,
15737        __input: &[u8],
15738    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15739        let avail_len = __input.len();
15740        let mut payload_buf = [0; Self::ENCODED_LEN];
15741        let mut buf = if avail_len < Self::ENCODED_LEN {
15742            payload_buf[0..avail_len].copy_from_slice(__input);
15743            Bytes::new(&payload_buf)
15744        } else {
15745            Bytes::new(__input)
15746        };
15747        let mut __struct = Self::default();
15748        __struct.time_last_baseline_ms = buf.get_u32_le()?;
15749        __struct.tow = buf.get_u32_le()?;
15750        __struct.baseline_a_mm = buf.get_i32_le()?;
15751        __struct.baseline_b_mm = buf.get_i32_le()?;
15752        __struct.baseline_c_mm = buf.get_i32_le()?;
15753        __struct.accuracy = buf.get_u32_le()?;
15754        __struct.iar_num_hypotheses = buf.get_i32_le()?;
15755        __struct.wn = buf.get_u16_le()?;
15756        __struct.rtk_receiver_id = buf.get_u8()?;
15757        __struct.rtk_health = buf.get_u8()?;
15758        __struct.rtk_rate = buf.get_u8()?;
15759        __struct.nsats = buf.get_u8()?;
15760        let tmp = buf.get_u8()?;
15761        __struct.baseline_coords_type =
15762            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15763                enum_type: "RtkBaselineCoordinateSystem",
15764                value: tmp as u64,
15765            })?;
15766        Ok(__struct)
15767    }
15768    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15769        let mut __tmp = BytesMut::new(bytes);
15770        #[allow(clippy::absurd_extreme_comparisons)]
15771        #[allow(unused_comparisons)]
15772        if __tmp.remaining() < Self::ENCODED_LEN {
15773            panic!(
15774                "buffer is too small (need {} bytes, but got {})",
15775                Self::ENCODED_LEN,
15776                __tmp.remaining(),
15777            )
15778        }
15779        __tmp.put_u32_le(self.time_last_baseline_ms);
15780        __tmp.put_u32_le(self.tow);
15781        __tmp.put_i32_le(self.baseline_a_mm);
15782        __tmp.put_i32_le(self.baseline_b_mm);
15783        __tmp.put_i32_le(self.baseline_c_mm);
15784        __tmp.put_u32_le(self.accuracy);
15785        __tmp.put_i32_le(self.iar_num_hypotheses);
15786        __tmp.put_u16_le(self.wn);
15787        __tmp.put_u8(self.rtk_receiver_id);
15788        __tmp.put_u8(self.rtk_health);
15789        __tmp.put_u8(self.rtk_rate);
15790        __tmp.put_u8(self.nsats);
15791        __tmp.put_u8(self.baseline_coords_type as u8);
15792        if matches!(version, MavlinkVersion::V2) {
15793            let len = __tmp.len();
15794            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15795        } else {
15796            __tmp.len()
15797        }
15798    }
15799}
15800#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15801#[doc = ""]
15802#[doc = "ID: 25"]
15803#[derive(Debug, Clone, PartialEq)]
15804#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15805#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15806#[cfg_attr(feature = "ts", derive(TS))]
15807#[cfg_attr(feature = "ts", ts(export))]
15808pub struct GPS_STATUS_DATA {
15809    #[doc = "Number of satellites visible"]
15810    pub satellites_visible: u8,
15811    #[doc = "Global satellite ID"]
15812    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15813    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15814    pub satellite_prn: [u8; 20],
15815    #[doc = "0: Satellite not used, 1: used for localization"]
15816    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15817    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15818    pub satellite_used: [u8; 20],
15819    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15820    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15821    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15822    pub satellite_elevation: [u8; 20],
15823    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15824    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15825    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15826    pub satellite_azimuth: [u8; 20],
15827    #[doc = "Signal to noise ratio of satellite"]
15828    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15829    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15830    pub satellite_snr: [u8; 20],
15831}
15832impl GPS_STATUS_DATA {
15833    pub const ENCODED_LEN: usize = 101usize;
15834    pub const DEFAULT: Self = Self {
15835        satellites_visible: 0_u8,
15836        satellite_prn: [0_u8; 20usize],
15837        satellite_used: [0_u8; 20usize],
15838        satellite_elevation: [0_u8; 20usize],
15839        satellite_azimuth: [0_u8; 20usize],
15840        satellite_snr: [0_u8; 20usize],
15841    };
15842    #[cfg(feature = "arbitrary")]
15843    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15844        use arbitrary::{Arbitrary, Unstructured};
15845        let mut buf = [0u8; 1024];
15846        rng.fill_bytes(&mut buf);
15847        let mut unstructured = Unstructured::new(&buf);
15848        Self::arbitrary(&mut unstructured).unwrap_or_default()
15849    }
15850}
15851impl Default for GPS_STATUS_DATA {
15852    fn default() -> Self {
15853        Self::DEFAULT.clone()
15854    }
15855}
15856impl MessageData for GPS_STATUS_DATA {
15857    type Message = MavMessage;
15858    const ID: u32 = 25u32;
15859    const NAME: &'static str = "GPS_STATUS";
15860    const EXTRA_CRC: u8 = 23u8;
15861    const ENCODED_LEN: usize = 101usize;
15862    fn deser(
15863        _version: MavlinkVersion,
15864        __input: &[u8],
15865    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15866        let avail_len = __input.len();
15867        let mut payload_buf = [0; Self::ENCODED_LEN];
15868        let mut buf = if avail_len < Self::ENCODED_LEN {
15869            payload_buf[0..avail_len].copy_from_slice(__input);
15870            Bytes::new(&payload_buf)
15871        } else {
15872            Bytes::new(__input)
15873        };
15874        let mut __struct = Self::default();
15875        __struct.satellites_visible = buf.get_u8()?;
15876        for v in &mut __struct.satellite_prn {
15877            let val = buf.get_u8()?;
15878            *v = val;
15879        }
15880        for v in &mut __struct.satellite_used {
15881            let val = buf.get_u8()?;
15882            *v = val;
15883        }
15884        for v in &mut __struct.satellite_elevation {
15885            let val = buf.get_u8()?;
15886            *v = val;
15887        }
15888        for v in &mut __struct.satellite_azimuth {
15889            let val = buf.get_u8()?;
15890            *v = val;
15891        }
15892        for v in &mut __struct.satellite_snr {
15893            let val = buf.get_u8()?;
15894            *v = val;
15895        }
15896        Ok(__struct)
15897    }
15898    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15899        let mut __tmp = BytesMut::new(bytes);
15900        #[allow(clippy::absurd_extreme_comparisons)]
15901        #[allow(unused_comparisons)]
15902        if __tmp.remaining() < Self::ENCODED_LEN {
15903            panic!(
15904                "buffer is too small (need {} bytes, but got {})",
15905                Self::ENCODED_LEN,
15906                __tmp.remaining(),
15907            )
15908        }
15909        __tmp.put_u8(self.satellites_visible);
15910        for val in &self.satellite_prn {
15911            __tmp.put_u8(*val);
15912        }
15913        for val in &self.satellite_used {
15914            __tmp.put_u8(*val);
15915        }
15916        for val in &self.satellite_elevation {
15917            __tmp.put_u8(*val);
15918        }
15919        for val in &self.satellite_azimuth {
15920            __tmp.put_u8(*val);
15921        }
15922        for val in &self.satellite_snr {
15923            __tmp.put_u8(*val);
15924        }
15925        if matches!(version, MavlinkVersion::V2) {
15926            let len = __tmp.len();
15927            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15928        } else {
15929            __tmp.len()
15930        }
15931    }
15932}
15933#[doc = "Status of GSM modem (connected to onboard computer)."]
15934#[doc = ""]
15935#[doc = "ID: 8014"]
15936#[derive(Debug, Clone, PartialEq)]
15937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15939#[cfg_attr(feature = "ts", derive(TS))]
15940#[cfg_attr(feature = "ts", ts(export))]
15941pub struct GSM_LINK_STATUS_DATA {
15942    #[doc = "Timestamp (of OBC)"]
15943    pub timestamp: u64,
15944    #[doc = "GSM modem used"]
15945    pub gsm_modem_type: GsmModemType,
15946    #[doc = "GSM link type"]
15947    pub gsm_link_type: GsmLinkType,
15948    #[doc = "RSSI as reported by modem (unconverted)"]
15949    pub rssi: u8,
15950    #[doc = "RSRP (LTE) or RSCP (WCDMA) as reported by modem (unconverted)"]
15951    pub rsrp_rscp: u8,
15952    #[doc = "SINR (LTE) or ECIO (WCDMA) as reported by modem (unconverted)"]
15953    pub sinr_ecio: u8,
15954    #[doc = "RSRQ (LTE only) as reported by modem (unconverted)"]
15955    pub rsrq: u8,
15956}
15957impl GSM_LINK_STATUS_DATA {
15958    pub const ENCODED_LEN: usize = 14usize;
15959    pub const DEFAULT: Self = Self {
15960        timestamp: 0_u64,
15961        gsm_modem_type: GsmModemType::DEFAULT,
15962        gsm_link_type: GsmLinkType::DEFAULT,
15963        rssi: 0_u8,
15964        rsrp_rscp: 0_u8,
15965        sinr_ecio: 0_u8,
15966        rsrq: 0_u8,
15967    };
15968    #[cfg(feature = "arbitrary")]
15969    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15970        use arbitrary::{Arbitrary, Unstructured};
15971        let mut buf = [0u8; 1024];
15972        rng.fill_bytes(&mut buf);
15973        let mut unstructured = Unstructured::new(&buf);
15974        Self::arbitrary(&mut unstructured).unwrap_or_default()
15975    }
15976}
15977impl Default for GSM_LINK_STATUS_DATA {
15978    fn default() -> Self {
15979        Self::DEFAULT.clone()
15980    }
15981}
15982impl MessageData for GSM_LINK_STATUS_DATA {
15983    type Message = MavMessage;
15984    const ID: u32 = 8014u32;
15985    const NAME: &'static str = "GSM_LINK_STATUS";
15986    const EXTRA_CRC: u8 = 200u8;
15987    const ENCODED_LEN: usize = 14usize;
15988    fn deser(
15989        _version: MavlinkVersion,
15990        __input: &[u8],
15991    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15992        let avail_len = __input.len();
15993        let mut payload_buf = [0; Self::ENCODED_LEN];
15994        let mut buf = if avail_len < Self::ENCODED_LEN {
15995            payload_buf[0..avail_len].copy_from_slice(__input);
15996            Bytes::new(&payload_buf)
15997        } else {
15998            Bytes::new(__input)
15999        };
16000        let mut __struct = Self::default();
16001        __struct.timestamp = buf.get_u64_le()?;
16002        let tmp = buf.get_u8()?;
16003        __struct.gsm_modem_type =
16004            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16005                enum_type: "GsmModemType",
16006                value: tmp as u64,
16007            })?;
16008        let tmp = buf.get_u8()?;
16009        __struct.gsm_link_type =
16010            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16011                enum_type: "GsmLinkType",
16012                value: tmp as u64,
16013            })?;
16014        __struct.rssi = buf.get_u8()?;
16015        __struct.rsrp_rscp = buf.get_u8()?;
16016        __struct.sinr_ecio = buf.get_u8()?;
16017        __struct.rsrq = buf.get_u8()?;
16018        Ok(__struct)
16019    }
16020    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16021        let mut __tmp = BytesMut::new(bytes);
16022        #[allow(clippy::absurd_extreme_comparisons)]
16023        #[allow(unused_comparisons)]
16024        if __tmp.remaining() < Self::ENCODED_LEN {
16025            panic!(
16026                "buffer is too small (need {} bytes, but got {})",
16027                Self::ENCODED_LEN,
16028                __tmp.remaining(),
16029            )
16030        }
16031        __tmp.put_u64_le(self.timestamp);
16032        __tmp.put_u8(self.gsm_modem_type as u8);
16033        __tmp.put_u8(self.gsm_link_type as u8);
16034        __tmp.put_u8(self.rssi);
16035        __tmp.put_u8(self.rsrp_rscp);
16036        __tmp.put_u8(self.sinr_ecio);
16037        __tmp.put_u8(self.rsrq);
16038        if matches!(version, MavlinkVersion::V2) {
16039            let len = __tmp.len();
16040            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16041        } else {
16042            __tmp.len()
16043        }
16044    }
16045}
16046#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
16047#[doc = ""]
16048#[doc = "ID: 0"]
16049#[derive(Debug, Clone, PartialEq)]
16050#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16051#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16052#[cfg_attr(feature = "ts", derive(TS))]
16053#[cfg_attr(feature = "ts", ts(export))]
16054pub struct HEARTBEAT_DATA {
16055    #[doc = "A bitfield for use for autopilot-specific flags"]
16056    pub custom_mode: u32,
16057    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
16058    pub mavtype: MavType,
16059    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16060    pub autopilot: MavAutopilot,
16061    #[doc = "System mode bitmap."]
16062    pub base_mode: MavModeFlag,
16063    #[doc = "System status flag."]
16064    pub system_status: MavState,
16065    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
16066    pub mavlink_version: u8,
16067}
16068impl HEARTBEAT_DATA {
16069    pub const ENCODED_LEN: usize = 9usize;
16070    pub const DEFAULT: Self = Self {
16071        custom_mode: 0_u32,
16072        mavtype: MavType::DEFAULT,
16073        autopilot: MavAutopilot::DEFAULT,
16074        base_mode: MavModeFlag::DEFAULT,
16075        system_status: MavState::DEFAULT,
16076        mavlink_version: MINOR_MAVLINK_VERSION,
16077    };
16078    #[cfg(feature = "arbitrary")]
16079    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16080        use arbitrary::{Arbitrary, Unstructured};
16081        let mut buf = [0u8; 1024];
16082        rng.fill_bytes(&mut buf);
16083        let mut unstructured = Unstructured::new(&buf);
16084        Self::arbitrary(&mut unstructured).unwrap_or_default()
16085    }
16086}
16087impl Default for HEARTBEAT_DATA {
16088    fn default() -> Self {
16089        Self::DEFAULT.clone()
16090    }
16091}
16092impl MessageData for HEARTBEAT_DATA {
16093    type Message = MavMessage;
16094    const ID: u32 = 0u32;
16095    const NAME: &'static str = "HEARTBEAT";
16096    const EXTRA_CRC: u8 = 50u8;
16097    const ENCODED_LEN: usize = 9usize;
16098    fn deser(
16099        _version: MavlinkVersion,
16100        __input: &[u8],
16101    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16102        let avail_len = __input.len();
16103        let mut payload_buf = [0; Self::ENCODED_LEN];
16104        let mut buf = if avail_len < Self::ENCODED_LEN {
16105            payload_buf[0..avail_len].copy_from_slice(__input);
16106            Bytes::new(&payload_buf)
16107        } else {
16108            Bytes::new(__input)
16109        };
16110        let mut __struct = Self::default();
16111        __struct.custom_mode = buf.get_u32_le()?;
16112        let tmp = buf.get_u8()?;
16113        __struct.mavtype =
16114            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16115                enum_type: "MavType",
16116                value: tmp as u64,
16117            })?;
16118        let tmp = buf.get_u8()?;
16119        __struct.autopilot =
16120            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16121                enum_type: "MavAutopilot",
16122                value: tmp as u64,
16123            })?;
16124        let tmp = buf.get_u8()?;
16125        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
16126            ::mavlink_core::error::ParserError::InvalidFlag {
16127                flag_type: "MavModeFlag",
16128                value: tmp as u64,
16129            },
16130        )?;
16131        let tmp = buf.get_u8()?;
16132        __struct.system_status =
16133            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16134                enum_type: "MavState",
16135                value: tmp as u64,
16136            })?;
16137        __struct.mavlink_version = buf.get_u8()?;
16138        Ok(__struct)
16139    }
16140    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16141        let mut __tmp = BytesMut::new(bytes);
16142        #[allow(clippy::absurd_extreme_comparisons)]
16143        #[allow(unused_comparisons)]
16144        if __tmp.remaining() < Self::ENCODED_LEN {
16145            panic!(
16146                "buffer is too small (need {} bytes, but got {})",
16147                Self::ENCODED_LEN,
16148                __tmp.remaining(),
16149            )
16150        }
16151        __tmp.put_u32_le(self.custom_mode);
16152        __tmp.put_u8(self.mavtype as u8);
16153        __tmp.put_u8(self.autopilot as u8);
16154        __tmp.put_u8(self.base_mode.bits() as u8);
16155        __tmp.put_u8(self.system_status as u8);
16156        __tmp.put_u8(self.mavlink_version);
16157        if matches!(version, MavlinkVersion::V2) {
16158            let len = __tmp.len();
16159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16160        } else {
16161            __tmp.len()
16162        }
16163    }
16164}
16165#[doc = "The IMU readings in SI units in NED body frame."]
16166#[doc = ""]
16167#[doc = "ID: 105"]
16168#[derive(Debug, Clone, PartialEq)]
16169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16171#[cfg_attr(feature = "ts", derive(TS))]
16172#[cfg_attr(feature = "ts", ts(export))]
16173pub struct HIGHRES_IMU_DATA {
16174    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16175    pub time_usec: u64,
16176    #[doc = "X acceleration"]
16177    pub xacc: f32,
16178    #[doc = "Y acceleration"]
16179    pub yacc: f32,
16180    #[doc = "Z acceleration"]
16181    pub zacc: f32,
16182    #[doc = "Angular speed around X axis"]
16183    pub xgyro: f32,
16184    #[doc = "Angular speed around Y axis"]
16185    pub ygyro: f32,
16186    #[doc = "Angular speed around Z axis"]
16187    pub zgyro: f32,
16188    #[doc = "X Magnetic field"]
16189    pub xmag: f32,
16190    #[doc = "Y Magnetic field"]
16191    pub ymag: f32,
16192    #[doc = "Z Magnetic field"]
16193    pub zmag: f32,
16194    #[doc = "Absolute pressure"]
16195    pub abs_pressure: f32,
16196    #[doc = "Differential pressure"]
16197    pub diff_pressure: f32,
16198    #[doc = "Altitude calculated from pressure"]
16199    pub pressure_alt: f32,
16200    #[doc = "Temperature"]
16201    pub temperature: f32,
16202    #[doc = "Bitmap for fields that have updated since last message"]
16203    pub fields_updated: HighresImuUpdatedFlags,
16204    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
16205    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16206    pub id: u8,
16207}
16208impl HIGHRES_IMU_DATA {
16209    pub const ENCODED_LEN: usize = 63usize;
16210    pub const DEFAULT: Self = Self {
16211        time_usec: 0_u64,
16212        xacc: 0.0_f32,
16213        yacc: 0.0_f32,
16214        zacc: 0.0_f32,
16215        xgyro: 0.0_f32,
16216        ygyro: 0.0_f32,
16217        zgyro: 0.0_f32,
16218        xmag: 0.0_f32,
16219        ymag: 0.0_f32,
16220        zmag: 0.0_f32,
16221        abs_pressure: 0.0_f32,
16222        diff_pressure: 0.0_f32,
16223        pressure_alt: 0.0_f32,
16224        temperature: 0.0_f32,
16225        fields_updated: HighresImuUpdatedFlags::DEFAULT,
16226        id: 0_u8,
16227    };
16228    #[cfg(feature = "arbitrary")]
16229    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16230        use arbitrary::{Arbitrary, Unstructured};
16231        let mut buf = [0u8; 1024];
16232        rng.fill_bytes(&mut buf);
16233        let mut unstructured = Unstructured::new(&buf);
16234        Self::arbitrary(&mut unstructured).unwrap_or_default()
16235    }
16236}
16237impl Default for HIGHRES_IMU_DATA {
16238    fn default() -> Self {
16239        Self::DEFAULT.clone()
16240    }
16241}
16242impl MessageData for HIGHRES_IMU_DATA {
16243    type Message = MavMessage;
16244    const ID: u32 = 105u32;
16245    const NAME: &'static str = "HIGHRES_IMU";
16246    const EXTRA_CRC: u8 = 93u8;
16247    const ENCODED_LEN: usize = 63usize;
16248    fn deser(
16249        _version: MavlinkVersion,
16250        __input: &[u8],
16251    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16252        let avail_len = __input.len();
16253        let mut payload_buf = [0; Self::ENCODED_LEN];
16254        let mut buf = if avail_len < Self::ENCODED_LEN {
16255            payload_buf[0..avail_len].copy_from_slice(__input);
16256            Bytes::new(&payload_buf)
16257        } else {
16258            Bytes::new(__input)
16259        };
16260        let mut __struct = Self::default();
16261        __struct.time_usec = buf.get_u64_le()?;
16262        __struct.xacc = buf.get_f32_le()?;
16263        __struct.yacc = buf.get_f32_le()?;
16264        __struct.zacc = buf.get_f32_le()?;
16265        __struct.xgyro = buf.get_f32_le()?;
16266        __struct.ygyro = buf.get_f32_le()?;
16267        __struct.zgyro = buf.get_f32_le()?;
16268        __struct.xmag = buf.get_f32_le()?;
16269        __struct.ymag = buf.get_f32_le()?;
16270        __struct.zmag = buf.get_f32_le()?;
16271        __struct.abs_pressure = buf.get_f32_le()?;
16272        __struct.diff_pressure = buf.get_f32_le()?;
16273        __struct.pressure_alt = buf.get_f32_le()?;
16274        __struct.temperature = buf.get_f32_le()?;
16275        let tmp = buf.get_u16_le()?;
16276        __struct.fields_updated =
16277            HighresImuUpdatedFlags::from_bits(tmp as <HighresImuUpdatedFlags as Flags>::Bits)
16278                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16279                    flag_type: "HighresImuUpdatedFlags",
16280                    value: tmp as u64,
16281                })?;
16282        __struct.id = buf.get_u8()?;
16283        Ok(__struct)
16284    }
16285    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16286        let mut __tmp = BytesMut::new(bytes);
16287        #[allow(clippy::absurd_extreme_comparisons)]
16288        #[allow(unused_comparisons)]
16289        if __tmp.remaining() < Self::ENCODED_LEN {
16290            panic!(
16291                "buffer is too small (need {} bytes, but got {})",
16292                Self::ENCODED_LEN,
16293                __tmp.remaining(),
16294            )
16295        }
16296        __tmp.put_u64_le(self.time_usec);
16297        __tmp.put_f32_le(self.xacc);
16298        __tmp.put_f32_le(self.yacc);
16299        __tmp.put_f32_le(self.zacc);
16300        __tmp.put_f32_le(self.xgyro);
16301        __tmp.put_f32_le(self.ygyro);
16302        __tmp.put_f32_le(self.zgyro);
16303        __tmp.put_f32_le(self.xmag);
16304        __tmp.put_f32_le(self.ymag);
16305        __tmp.put_f32_le(self.zmag);
16306        __tmp.put_f32_le(self.abs_pressure);
16307        __tmp.put_f32_le(self.diff_pressure);
16308        __tmp.put_f32_le(self.pressure_alt);
16309        __tmp.put_f32_le(self.temperature);
16310        __tmp.put_u16_le(self.fields_updated.bits() as u16);
16311        if matches!(version, MavlinkVersion::V2) {
16312            __tmp.put_u8(self.id);
16313            let len = __tmp.len();
16314            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16315        } else {
16316            __tmp.len()
16317        }
16318    }
16319}
16320#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
16321#[doc = "Message appropriate for high latency connections like Iridium."]
16322#[doc = ""]
16323#[doc = "ID: 234"]
16324#[derive(Debug, Clone, PartialEq)]
16325#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16326#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16327#[cfg_attr(feature = "ts", derive(TS))]
16328#[cfg_attr(feature = "ts", ts(export))]
16329pub struct HIGH_LATENCY_DATA {
16330    #[doc = "A bitfield for use for autopilot-specific flags."]
16331    pub custom_mode: u32,
16332    #[doc = "Latitude"]
16333    pub latitude: i32,
16334    #[doc = "Longitude"]
16335    pub longitude: i32,
16336    #[doc = "roll"]
16337    pub roll: i16,
16338    #[doc = "pitch"]
16339    pub pitch: i16,
16340    #[doc = "heading"]
16341    pub heading: u16,
16342    #[doc = "heading setpoint"]
16343    pub heading_sp: i16,
16344    #[doc = "Altitude above mean sea level"]
16345    pub altitude_amsl: i16,
16346    #[doc = "Altitude setpoint relative to the home position"]
16347    pub altitude_sp: i16,
16348    #[doc = "distance to target"]
16349    pub wp_distance: u16,
16350    #[doc = "Bitmap of enabled system modes."]
16351    pub base_mode: MavModeFlag,
16352    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
16353    pub landed_state: MavLandedState,
16354    #[doc = "throttle (percentage)"]
16355    pub throttle: i8,
16356    #[doc = "airspeed"]
16357    pub airspeed: u8,
16358    #[doc = "airspeed setpoint"]
16359    pub airspeed_sp: u8,
16360    #[doc = "groundspeed"]
16361    pub groundspeed: u8,
16362    #[doc = "climb rate"]
16363    pub climb_rate: i8,
16364    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16365    pub gps_nsat: u8,
16366    #[doc = "GPS Fix type."]
16367    pub gps_fix_type: GpsFixType,
16368    #[doc = "Remaining battery (percentage)"]
16369    pub battery_remaining: u8,
16370    #[doc = "Autopilot temperature (degrees C)"]
16371    pub temperature: i8,
16372    #[doc = "Air temperature (degrees C) from airspeed sensor"]
16373    pub temperature_air: i8,
16374    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
16375    pub failsafe: u8,
16376    #[doc = "current waypoint number"]
16377    pub wp_num: u8,
16378}
16379impl HIGH_LATENCY_DATA {
16380    pub const ENCODED_LEN: usize = 40usize;
16381    pub const DEFAULT: Self = Self {
16382        custom_mode: 0_u32,
16383        latitude: 0_i32,
16384        longitude: 0_i32,
16385        roll: 0_i16,
16386        pitch: 0_i16,
16387        heading: 0_u16,
16388        heading_sp: 0_i16,
16389        altitude_amsl: 0_i16,
16390        altitude_sp: 0_i16,
16391        wp_distance: 0_u16,
16392        base_mode: MavModeFlag::DEFAULT,
16393        landed_state: MavLandedState::DEFAULT,
16394        throttle: 0_i8,
16395        airspeed: 0_u8,
16396        airspeed_sp: 0_u8,
16397        groundspeed: 0_u8,
16398        climb_rate: 0_i8,
16399        gps_nsat: 0_u8,
16400        gps_fix_type: GpsFixType::DEFAULT,
16401        battery_remaining: 0_u8,
16402        temperature: 0_i8,
16403        temperature_air: 0_i8,
16404        failsafe: 0_u8,
16405        wp_num: 0_u8,
16406    };
16407    #[cfg(feature = "arbitrary")]
16408    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16409        use arbitrary::{Arbitrary, Unstructured};
16410        let mut buf = [0u8; 1024];
16411        rng.fill_bytes(&mut buf);
16412        let mut unstructured = Unstructured::new(&buf);
16413        Self::arbitrary(&mut unstructured).unwrap_or_default()
16414    }
16415}
16416impl Default for HIGH_LATENCY_DATA {
16417    fn default() -> Self {
16418        Self::DEFAULT.clone()
16419    }
16420}
16421impl MessageData for HIGH_LATENCY_DATA {
16422    type Message = MavMessage;
16423    const ID: u32 = 234u32;
16424    const NAME: &'static str = "HIGH_LATENCY";
16425    const EXTRA_CRC: u8 = 150u8;
16426    const ENCODED_LEN: usize = 40usize;
16427    fn deser(
16428        _version: MavlinkVersion,
16429        __input: &[u8],
16430    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16431        let avail_len = __input.len();
16432        let mut payload_buf = [0; Self::ENCODED_LEN];
16433        let mut buf = if avail_len < Self::ENCODED_LEN {
16434            payload_buf[0..avail_len].copy_from_slice(__input);
16435            Bytes::new(&payload_buf)
16436        } else {
16437            Bytes::new(__input)
16438        };
16439        let mut __struct = Self::default();
16440        __struct.custom_mode = buf.get_u32_le()?;
16441        __struct.latitude = buf.get_i32_le()?;
16442        __struct.longitude = buf.get_i32_le()?;
16443        __struct.roll = buf.get_i16_le()?;
16444        __struct.pitch = buf.get_i16_le()?;
16445        __struct.heading = buf.get_u16_le()?;
16446        __struct.heading_sp = buf.get_i16_le()?;
16447        __struct.altitude_amsl = buf.get_i16_le()?;
16448        __struct.altitude_sp = buf.get_i16_le()?;
16449        __struct.wp_distance = buf.get_u16_le()?;
16450        let tmp = buf.get_u8()?;
16451        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
16452            ::mavlink_core::error::ParserError::InvalidFlag {
16453                flag_type: "MavModeFlag",
16454                value: tmp as u64,
16455            },
16456        )?;
16457        let tmp = buf.get_u8()?;
16458        __struct.landed_state =
16459            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16460                enum_type: "MavLandedState",
16461                value: tmp as u64,
16462            })?;
16463        __struct.throttle = buf.get_i8()?;
16464        __struct.airspeed = buf.get_u8()?;
16465        __struct.airspeed_sp = buf.get_u8()?;
16466        __struct.groundspeed = buf.get_u8()?;
16467        __struct.climb_rate = buf.get_i8()?;
16468        __struct.gps_nsat = buf.get_u8()?;
16469        let tmp = buf.get_u8()?;
16470        __struct.gps_fix_type =
16471            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16472                enum_type: "GpsFixType",
16473                value: tmp as u64,
16474            })?;
16475        __struct.battery_remaining = buf.get_u8()?;
16476        __struct.temperature = buf.get_i8()?;
16477        __struct.temperature_air = buf.get_i8()?;
16478        __struct.failsafe = buf.get_u8()?;
16479        __struct.wp_num = buf.get_u8()?;
16480        Ok(__struct)
16481    }
16482    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16483        let mut __tmp = BytesMut::new(bytes);
16484        #[allow(clippy::absurd_extreme_comparisons)]
16485        #[allow(unused_comparisons)]
16486        if __tmp.remaining() < Self::ENCODED_LEN {
16487            panic!(
16488                "buffer is too small (need {} bytes, but got {})",
16489                Self::ENCODED_LEN,
16490                __tmp.remaining(),
16491            )
16492        }
16493        __tmp.put_u32_le(self.custom_mode);
16494        __tmp.put_i32_le(self.latitude);
16495        __tmp.put_i32_le(self.longitude);
16496        __tmp.put_i16_le(self.roll);
16497        __tmp.put_i16_le(self.pitch);
16498        __tmp.put_u16_le(self.heading);
16499        __tmp.put_i16_le(self.heading_sp);
16500        __tmp.put_i16_le(self.altitude_amsl);
16501        __tmp.put_i16_le(self.altitude_sp);
16502        __tmp.put_u16_le(self.wp_distance);
16503        __tmp.put_u8(self.base_mode.bits() as u8);
16504        __tmp.put_u8(self.landed_state as u8);
16505        __tmp.put_i8(self.throttle);
16506        __tmp.put_u8(self.airspeed);
16507        __tmp.put_u8(self.airspeed_sp);
16508        __tmp.put_u8(self.groundspeed);
16509        __tmp.put_i8(self.climb_rate);
16510        __tmp.put_u8(self.gps_nsat);
16511        __tmp.put_u8(self.gps_fix_type as u8);
16512        __tmp.put_u8(self.battery_remaining);
16513        __tmp.put_i8(self.temperature);
16514        __tmp.put_i8(self.temperature_air);
16515        __tmp.put_u8(self.failsafe);
16516        __tmp.put_u8(self.wp_num);
16517        if matches!(version, MavlinkVersion::V2) {
16518            let len = __tmp.len();
16519            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16520        } else {
16521            __tmp.len()
16522        }
16523    }
16524}
16525#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
16526#[doc = ""]
16527#[doc = "ID: 235"]
16528#[derive(Debug, Clone, PartialEq)]
16529#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16530#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16531#[cfg_attr(feature = "ts", derive(TS))]
16532#[cfg_attr(feature = "ts", ts(export))]
16533pub struct HIGH_LATENCY2_DATA {
16534    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
16535    pub timestamp: u32,
16536    #[doc = "Latitude"]
16537    pub latitude: i32,
16538    #[doc = "Longitude"]
16539    pub longitude: i32,
16540    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
16541    pub custom_mode: u16,
16542    #[doc = "Altitude above mean sea level"]
16543    pub altitude: i16,
16544    #[doc = "Altitude setpoint"]
16545    pub target_altitude: i16,
16546    #[doc = "Distance to target waypoint or position"]
16547    pub target_distance: u16,
16548    #[doc = "Current waypoint number"]
16549    pub wp_num: u16,
16550    #[doc = "Bitmap of failure flags."]
16551    pub failure_flags: HlFailureFlag,
16552    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
16553    pub mavtype: MavType,
16554    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16555    pub autopilot: MavAutopilot,
16556    #[doc = "Heading"]
16557    pub heading: u8,
16558    #[doc = "Heading setpoint"]
16559    pub target_heading: u8,
16560    #[doc = "Throttle"]
16561    pub throttle: u8,
16562    #[doc = "Airspeed"]
16563    pub airspeed: u8,
16564    #[doc = "Airspeed setpoint"]
16565    pub airspeed_sp: u8,
16566    #[doc = "Groundspeed"]
16567    pub groundspeed: u8,
16568    #[doc = "Windspeed"]
16569    pub windspeed: u8,
16570    #[doc = "Wind heading"]
16571    pub wind_heading: u8,
16572    #[doc = "Maximum error horizontal position since last message"]
16573    pub eph: u8,
16574    #[doc = "Maximum error vertical position since last message"]
16575    pub epv: u8,
16576    #[doc = "Air temperature"]
16577    pub temperature_air: i8,
16578    #[doc = "Maximum climb rate magnitude since last message"]
16579    pub climb_rate: i8,
16580    #[doc = "Battery level (-1 if field not provided)."]
16581    pub battery: i8,
16582    #[doc = "Field for custom payload."]
16583    pub custom0: i8,
16584    #[doc = "Field for custom payload."]
16585    pub custom1: i8,
16586    #[doc = "Field for custom payload."]
16587    pub custom2: i8,
16588}
16589impl HIGH_LATENCY2_DATA {
16590    pub const ENCODED_LEN: usize = 42usize;
16591    pub const DEFAULT: Self = Self {
16592        timestamp: 0_u32,
16593        latitude: 0_i32,
16594        longitude: 0_i32,
16595        custom_mode: 0_u16,
16596        altitude: 0_i16,
16597        target_altitude: 0_i16,
16598        target_distance: 0_u16,
16599        wp_num: 0_u16,
16600        failure_flags: HlFailureFlag::DEFAULT,
16601        mavtype: MavType::DEFAULT,
16602        autopilot: MavAutopilot::DEFAULT,
16603        heading: 0_u8,
16604        target_heading: 0_u8,
16605        throttle: 0_u8,
16606        airspeed: 0_u8,
16607        airspeed_sp: 0_u8,
16608        groundspeed: 0_u8,
16609        windspeed: 0_u8,
16610        wind_heading: 0_u8,
16611        eph: 0_u8,
16612        epv: 0_u8,
16613        temperature_air: 0_i8,
16614        climb_rate: 0_i8,
16615        battery: 0_i8,
16616        custom0: 0_i8,
16617        custom1: 0_i8,
16618        custom2: 0_i8,
16619    };
16620    #[cfg(feature = "arbitrary")]
16621    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16622        use arbitrary::{Arbitrary, Unstructured};
16623        let mut buf = [0u8; 1024];
16624        rng.fill_bytes(&mut buf);
16625        let mut unstructured = Unstructured::new(&buf);
16626        Self::arbitrary(&mut unstructured).unwrap_or_default()
16627    }
16628}
16629impl Default for HIGH_LATENCY2_DATA {
16630    fn default() -> Self {
16631        Self::DEFAULT.clone()
16632    }
16633}
16634impl MessageData for HIGH_LATENCY2_DATA {
16635    type Message = MavMessage;
16636    const ID: u32 = 235u32;
16637    const NAME: &'static str = "HIGH_LATENCY2";
16638    const EXTRA_CRC: u8 = 179u8;
16639    const ENCODED_LEN: usize = 42usize;
16640    fn deser(
16641        _version: MavlinkVersion,
16642        __input: &[u8],
16643    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16644        let avail_len = __input.len();
16645        let mut payload_buf = [0; Self::ENCODED_LEN];
16646        let mut buf = if avail_len < Self::ENCODED_LEN {
16647            payload_buf[0..avail_len].copy_from_slice(__input);
16648            Bytes::new(&payload_buf)
16649        } else {
16650            Bytes::new(__input)
16651        };
16652        let mut __struct = Self::default();
16653        __struct.timestamp = buf.get_u32_le()?;
16654        __struct.latitude = buf.get_i32_le()?;
16655        __struct.longitude = buf.get_i32_le()?;
16656        __struct.custom_mode = buf.get_u16_le()?;
16657        __struct.altitude = buf.get_i16_le()?;
16658        __struct.target_altitude = buf.get_i16_le()?;
16659        __struct.target_distance = buf.get_u16_le()?;
16660        __struct.wp_num = buf.get_u16_le()?;
16661        let tmp = buf.get_u16_le()?;
16662        __struct.failure_flags = HlFailureFlag::from_bits(tmp as <HlFailureFlag as Flags>::Bits)
16663            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16664                flag_type: "HlFailureFlag",
16665                value: tmp as u64,
16666            })?;
16667        let tmp = buf.get_u8()?;
16668        __struct.mavtype =
16669            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16670                enum_type: "MavType",
16671                value: tmp as u64,
16672            })?;
16673        let tmp = buf.get_u8()?;
16674        __struct.autopilot =
16675            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16676                enum_type: "MavAutopilot",
16677                value: tmp as u64,
16678            })?;
16679        __struct.heading = buf.get_u8()?;
16680        __struct.target_heading = buf.get_u8()?;
16681        __struct.throttle = buf.get_u8()?;
16682        __struct.airspeed = buf.get_u8()?;
16683        __struct.airspeed_sp = buf.get_u8()?;
16684        __struct.groundspeed = buf.get_u8()?;
16685        __struct.windspeed = buf.get_u8()?;
16686        __struct.wind_heading = buf.get_u8()?;
16687        __struct.eph = buf.get_u8()?;
16688        __struct.epv = buf.get_u8()?;
16689        __struct.temperature_air = buf.get_i8()?;
16690        __struct.climb_rate = buf.get_i8()?;
16691        __struct.battery = buf.get_i8()?;
16692        __struct.custom0 = buf.get_i8()?;
16693        __struct.custom1 = buf.get_i8()?;
16694        __struct.custom2 = buf.get_i8()?;
16695        Ok(__struct)
16696    }
16697    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16698        let mut __tmp = BytesMut::new(bytes);
16699        #[allow(clippy::absurd_extreme_comparisons)]
16700        #[allow(unused_comparisons)]
16701        if __tmp.remaining() < Self::ENCODED_LEN {
16702            panic!(
16703                "buffer is too small (need {} bytes, but got {})",
16704                Self::ENCODED_LEN,
16705                __tmp.remaining(),
16706            )
16707        }
16708        __tmp.put_u32_le(self.timestamp);
16709        __tmp.put_i32_le(self.latitude);
16710        __tmp.put_i32_le(self.longitude);
16711        __tmp.put_u16_le(self.custom_mode);
16712        __tmp.put_i16_le(self.altitude);
16713        __tmp.put_i16_le(self.target_altitude);
16714        __tmp.put_u16_le(self.target_distance);
16715        __tmp.put_u16_le(self.wp_num);
16716        __tmp.put_u16_le(self.failure_flags.bits() as u16);
16717        __tmp.put_u8(self.mavtype as u8);
16718        __tmp.put_u8(self.autopilot as u8);
16719        __tmp.put_u8(self.heading);
16720        __tmp.put_u8(self.target_heading);
16721        __tmp.put_u8(self.throttle);
16722        __tmp.put_u8(self.airspeed);
16723        __tmp.put_u8(self.airspeed_sp);
16724        __tmp.put_u8(self.groundspeed);
16725        __tmp.put_u8(self.windspeed);
16726        __tmp.put_u8(self.wind_heading);
16727        __tmp.put_u8(self.eph);
16728        __tmp.put_u8(self.epv);
16729        __tmp.put_i8(self.temperature_air);
16730        __tmp.put_i8(self.climb_rate);
16731        __tmp.put_i8(self.battery);
16732        __tmp.put_i8(self.custom0);
16733        __tmp.put_i8(self.custom1);
16734        __tmp.put_i8(self.custom2);
16735        if matches!(version, MavlinkVersion::V2) {
16736            let len = __tmp.len();
16737            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16738        } else {
16739            __tmp.len()
16740        }
16741    }
16742}
16743#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
16744#[doc = ""]
16745#[doc = "ID: 93"]
16746#[derive(Debug, Clone, PartialEq)]
16747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16749#[cfg_attr(feature = "ts", derive(TS))]
16750#[cfg_attr(feature = "ts", ts(export))]
16751pub struct HIL_ACTUATOR_CONTROLS_DATA {
16752    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16753    pub time_usec: u64,
16754    #[doc = "Flags bitmask."]
16755    pub flags: HilActuatorControlsFlags,
16756    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16757    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16758    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16759    pub controls: [f32; 16],
16760    #[doc = "System mode. Includes arming state."]
16761    pub mode: MavModeFlag,
16762}
16763impl HIL_ACTUATOR_CONTROLS_DATA {
16764    pub const ENCODED_LEN: usize = 81usize;
16765    pub const DEFAULT: Self = Self {
16766        time_usec: 0_u64,
16767        flags: HilActuatorControlsFlags::DEFAULT,
16768        controls: [0.0_f32; 16usize],
16769        mode: MavModeFlag::DEFAULT,
16770    };
16771    #[cfg(feature = "arbitrary")]
16772    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16773        use arbitrary::{Arbitrary, Unstructured};
16774        let mut buf = [0u8; 1024];
16775        rng.fill_bytes(&mut buf);
16776        let mut unstructured = Unstructured::new(&buf);
16777        Self::arbitrary(&mut unstructured).unwrap_or_default()
16778    }
16779}
16780impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16781    fn default() -> Self {
16782        Self::DEFAULT.clone()
16783    }
16784}
16785impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16786    type Message = MavMessage;
16787    const ID: u32 = 93u32;
16788    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16789    const EXTRA_CRC: u8 = 47u8;
16790    const ENCODED_LEN: usize = 81usize;
16791    fn deser(
16792        _version: MavlinkVersion,
16793        __input: &[u8],
16794    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16795        let avail_len = __input.len();
16796        let mut payload_buf = [0; Self::ENCODED_LEN];
16797        let mut buf = if avail_len < Self::ENCODED_LEN {
16798            payload_buf[0..avail_len].copy_from_slice(__input);
16799            Bytes::new(&payload_buf)
16800        } else {
16801            Bytes::new(__input)
16802        };
16803        let mut __struct = Self::default();
16804        __struct.time_usec = buf.get_u64_le()?;
16805        let tmp = buf.get_u64_le()?;
16806        __struct.flags =
16807            HilActuatorControlsFlags::from_bits(tmp as <HilActuatorControlsFlags as Flags>::Bits)
16808                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16809                flag_type: "HilActuatorControlsFlags",
16810                value: tmp as u64,
16811            })?;
16812        for v in &mut __struct.controls {
16813            let val = buf.get_f32_le()?;
16814            *v = val;
16815        }
16816        let tmp = buf.get_u8()?;
16817        __struct.mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
16818            ::mavlink_core::error::ParserError::InvalidFlag {
16819                flag_type: "MavModeFlag",
16820                value: tmp as u64,
16821            },
16822        )?;
16823        Ok(__struct)
16824    }
16825    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16826        let mut __tmp = BytesMut::new(bytes);
16827        #[allow(clippy::absurd_extreme_comparisons)]
16828        #[allow(unused_comparisons)]
16829        if __tmp.remaining() < Self::ENCODED_LEN {
16830            panic!(
16831                "buffer is too small (need {} bytes, but got {})",
16832                Self::ENCODED_LEN,
16833                __tmp.remaining(),
16834            )
16835        }
16836        __tmp.put_u64_le(self.time_usec);
16837        __tmp.put_u64_le(self.flags.bits() as u64);
16838        for val in &self.controls {
16839            __tmp.put_f32_le(*val);
16840        }
16841        __tmp.put_u8(self.mode.bits() as u8);
16842        if matches!(version, MavlinkVersion::V2) {
16843            let len = __tmp.len();
16844            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16845        } else {
16846            __tmp.len()
16847        }
16848    }
16849}
16850#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16851#[doc = ""]
16852#[doc = "ID: 91"]
16853#[derive(Debug, Clone, PartialEq)]
16854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16856#[cfg_attr(feature = "ts", derive(TS))]
16857#[cfg_attr(feature = "ts", ts(export))]
16858pub struct HIL_CONTROLS_DATA {
16859    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16860    pub time_usec: u64,
16861    #[doc = "Control output -1 .. 1"]
16862    pub roll_ailerons: f32,
16863    #[doc = "Control output -1 .. 1"]
16864    pub pitch_elevator: f32,
16865    #[doc = "Control output -1 .. 1"]
16866    pub yaw_rudder: f32,
16867    #[doc = "Throttle 0 .. 1"]
16868    pub throttle: f32,
16869    #[doc = "Aux 1, -1 .. 1"]
16870    pub aux1: f32,
16871    #[doc = "Aux 2, -1 .. 1"]
16872    pub aux2: f32,
16873    #[doc = "Aux 3, -1 .. 1"]
16874    pub aux3: f32,
16875    #[doc = "Aux 4, -1 .. 1"]
16876    pub aux4: f32,
16877    #[doc = "System mode."]
16878    pub mode: MavMode,
16879    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16880    pub nav_mode: u8,
16881}
16882impl HIL_CONTROLS_DATA {
16883    pub const ENCODED_LEN: usize = 42usize;
16884    pub const DEFAULT: Self = Self {
16885        time_usec: 0_u64,
16886        roll_ailerons: 0.0_f32,
16887        pitch_elevator: 0.0_f32,
16888        yaw_rudder: 0.0_f32,
16889        throttle: 0.0_f32,
16890        aux1: 0.0_f32,
16891        aux2: 0.0_f32,
16892        aux3: 0.0_f32,
16893        aux4: 0.0_f32,
16894        mode: MavMode::DEFAULT,
16895        nav_mode: 0_u8,
16896    };
16897    #[cfg(feature = "arbitrary")]
16898    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16899        use arbitrary::{Arbitrary, Unstructured};
16900        let mut buf = [0u8; 1024];
16901        rng.fill_bytes(&mut buf);
16902        let mut unstructured = Unstructured::new(&buf);
16903        Self::arbitrary(&mut unstructured).unwrap_or_default()
16904    }
16905}
16906impl Default for HIL_CONTROLS_DATA {
16907    fn default() -> Self {
16908        Self::DEFAULT.clone()
16909    }
16910}
16911impl MessageData for HIL_CONTROLS_DATA {
16912    type Message = MavMessage;
16913    const ID: u32 = 91u32;
16914    const NAME: &'static str = "HIL_CONTROLS";
16915    const EXTRA_CRC: u8 = 63u8;
16916    const ENCODED_LEN: usize = 42usize;
16917    fn deser(
16918        _version: MavlinkVersion,
16919        __input: &[u8],
16920    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16921        let avail_len = __input.len();
16922        let mut payload_buf = [0; Self::ENCODED_LEN];
16923        let mut buf = if avail_len < Self::ENCODED_LEN {
16924            payload_buf[0..avail_len].copy_from_slice(__input);
16925            Bytes::new(&payload_buf)
16926        } else {
16927            Bytes::new(__input)
16928        };
16929        let mut __struct = Self::default();
16930        __struct.time_usec = buf.get_u64_le()?;
16931        __struct.roll_ailerons = buf.get_f32_le()?;
16932        __struct.pitch_elevator = buf.get_f32_le()?;
16933        __struct.yaw_rudder = buf.get_f32_le()?;
16934        __struct.throttle = buf.get_f32_le()?;
16935        __struct.aux1 = buf.get_f32_le()?;
16936        __struct.aux2 = buf.get_f32_le()?;
16937        __struct.aux3 = buf.get_f32_le()?;
16938        __struct.aux4 = buf.get_f32_le()?;
16939        let tmp = buf.get_u8()?;
16940        __struct.mode =
16941            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16942                enum_type: "MavMode",
16943                value: tmp as u64,
16944            })?;
16945        __struct.nav_mode = buf.get_u8()?;
16946        Ok(__struct)
16947    }
16948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16949        let mut __tmp = BytesMut::new(bytes);
16950        #[allow(clippy::absurd_extreme_comparisons)]
16951        #[allow(unused_comparisons)]
16952        if __tmp.remaining() < Self::ENCODED_LEN {
16953            panic!(
16954                "buffer is too small (need {} bytes, but got {})",
16955                Self::ENCODED_LEN,
16956                __tmp.remaining(),
16957            )
16958        }
16959        __tmp.put_u64_le(self.time_usec);
16960        __tmp.put_f32_le(self.roll_ailerons);
16961        __tmp.put_f32_le(self.pitch_elevator);
16962        __tmp.put_f32_le(self.yaw_rudder);
16963        __tmp.put_f32_le(self.throttle);
16964        __tmp.put_f32_le(self.aux1);
16965        __tmp.put_f32_le(self.aux2);
16966        __tmp.put_f32_le(self.aux3);
16967        __tmp.put_f32_le(self.aux4);
16968        __tmp.put_u8(self.mode as u8);
16969        __tmp.put_u8(self.nav_mode);
16970        if matches!(version, MavlinkVersion::V2) {
16971            let len = __tmp.len();
16972            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16973        } else {
16974            __tmp.len()
16975        }
16976    }
16977}
16978#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16979#[doc = ""]
16980#[doc = "ID: 113"]
16981#[derive(Debug, Clone, PartialEq)]
16982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16984#[cfg_attr(feature = "ts", derive(TS))]
16985#[cfg_attr(feature = "ts", ts(export))]
16986pub struct HIL_GPS_DATA {
16987    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16988    pub time_usec: u64,
16989    #[doc = "Latitude (WGS84)"]
16990    pub lat: i32,
16991    #[doc = "Longitude (WGS84)"]
16992    pub lon: i32,
16993    #[doc = "Altitude (MSL). Positive for up."]
16994    pub alt: i32,
16995    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16996    pub eph: u16,
16997    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16998    pub epv: u16,
16999    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
17000    pub vel: u16,
17001    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
17002    pub vn: i16,
17003    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
17004    pub ve: i16,
17005    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
17006    pub vd: i16,
17007    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
17008    pub cog: u16,
17009    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
17010    pub fix_type: u8,
17011    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
17012    pub satellites_visible: u8,
17013    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
17014    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17015    pub id: u8,
17016    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
17017    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17018    pub yaw: u16,
17019}
17020impl HIL_GPS_DATA {
17021    pub const ENCODED_LEN: usize = 39usize;
17022    pub const DEFAULT: Self = Self {
17023        time_usec: 0_u64,
17024        lat: 0_i32,
17025        lon: 0_i32,
17026        alt: 0_i32,
17027        eph: 0_u16,
17028        epv: 0_u16,
17029        vel: 0_u16,
17030        vn: 0_i16,
17031        ve: 0_i16,
17032        vd: 0_i16,
17033        cog: 0_u16,
17034        fix_type: 0_u8,
17035        satellites_visible: 0_u8,
17036        id: 0_u8,
17037        yaw: 0_u16,
17038    };
17039    #[cfg(feature = "arbitrary")]
17040    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17041        use arbitrary::{Arbitrary, Unstructured};
17042        let mut buf = [0u8; 1024];
17043        rng.fill_bytes(&mut buf);
17044        let mut unstructured = Unstructured::new(&buf);
17045        Self::arbitrary(&mut unstructured).unwrap_or_default()
17046    }
17047}
17048impl Default for HIL_GPS_DATA {
17049    fn default() -> Self {
17050        Self::DEFAULT.clone()
17051    }
17052}
17053impl MessageData for HIL_GPS_DATA {
17054    type Message = MavMessage;
17055    const ID: u32 = 113u32;
17056    const NAME: &'static str = "HIL_GPS";
17057    const EXTRA_CRC: u8 = 124u8;
17058    const ENCODED_LEN: usize = 39usize;
17059    fn deser(
17060        _version: MavlinkVersion,
17061        __input: &[u8],
17062    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17063        let avail_len = __input.len();
17064        let mut payload_buf = [0; Self::ENCODED_LEN];
17065        let mut buf = if avail_len < Self::ENCODED_LEN {
17066            payload_buf[0..avail_len].copy_from_slice(__input);
17067            Bytes::new(&payload_buf)
17068        } else {
17069            Bytes::new(__input)
17070        };
17071        let mut __struct = Self::default();
17072        __struct.time_usec = buf.get_u64_le()?;
17073        __struct.lat = buf.get_i32_le()?;
17074        __struct.lon = buf.get_i32_le()?;
17075        __struct.alt = buf.get_i32_le()?;
17076        __struct.eph = buf.get_u16_le()?;
17077        __struct.epv = buf.get_u16_le()?;
17078        __struct.vel = buf.get_u16_le()?;
17079        __struct.vn = buf.get_i16_le()?;
17080        __struct.ve = buf.get_i16_le()?;
17081        __struct.vd = buf.get_i16_le()?;
17082        __struct.cog = buf.get_u16_le()?;
17083        __struct.fix_type = buf.get_u8()?;
17084        __struct.satellites_visible = buf.get_u8()?;
17085        __struct.id = buf.get_u8()?;
17086        __struct.yaw = buf.get_u16_le()?;
17087        Ok(__struct)
17088    }
17089    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17090        let mut __tmp = BytesMut::new(bytes);
17091        #[allow(clippy::absurd_extreme_comparisons)]
17092        #[allow(unused_comparisons)]
17093        if __tmp.remaining() < Self::ENCODED_LEN {
17094            panic!(
17095                "buffer is too small (need {} bytes, but got {})",
17096                Self::ENCODED_LEN,
17097                __tmp.remaining(),
17098            )
17099        }
17100        __tmp.put_u64_le(self.time_usec);
17101        __tmp.put_i32_le(self.lat);
17102        __tmp.put_i32_le(self.lon);
17103        __tmp.put_i32_le(self.alt);
17104        __tmp.put_u16_le(self.eph);
17105        __tmp.put_u16_le(self.epv);
17106        __tmp.put_u16_le(self.vel);
17107        __tmp.put_i16_le(self.vn);
17108        __tmp.put_i16_le(self.ve);
17109        __tmp.put_i16_le(self.vd);
17110        __tmp.put_u16_le(self.cog);
17111        __tmp.put_u8(self.fix_type);
17112        __tmp.put_u8(self.satellites_visible);
17113        if matches!(version, MavlinkVersion::V2) {
17114            __tmp.put_u8(self.id);
17115            __tmp.put_u16_le(self.yaw);
17116            let len = __tmp.len();
17117            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17118        } else {
17119            __tmp.len()
17120        }
17121    }
17122}
17123#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
17124#[doc = ""]
17125#[doc = "ID: 114"]
17126#[derive(Debug, Clone, PartialEq)]
17127#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17128#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17129#[cfg_attr(feature = "ts", derive(TS))]
17130#[cfg_attr(feature = "ts", ts(export))]
17131pub struct HIL_OPTICAL_FLOW_DATA {
17132    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17133    pub time_usec: u64,
17134    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
17135    pub integration_time_us: u32,
17136    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
17137    pub integrated_x: f32,
17138    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
17139    pub integrated_y: f32,
17140    #[doc = "RH rotation around X axis"]
17141    pub integrated_xgyro: f32,
17142    #[doc = "RH rotation around Y axis"]
17143    pub integrated_ygyro: f32,
17144    #[doc = "RH rotation around Z axis"]
17145    pub integrated_zgyro: f32,
17146    #[doc = "Time since the distance was sampled."]
17147    pub time_delta_distance_us: u32,
17148    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
17149    pub distance: f32,
17150    #[doc = "Temperature"]
17151    pub temperature: i16,
17152    #[doc = "Sensor ID"]
17153    pub sensor_id: u8,
17154    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
17155    pub quality: u8,
17156}
17157impl HIL_OPTICAL_FLOW_DATA {
17158    pub const ENCODED_LEN: usize = 44usize;
17159    pub const DEFAULT: Self = Self {
17160        time_usec: 0_u64,
17161        integration_time_us: 0_u32,
17162        integrated_x: 0.0_f32,
17163        integrated_y: 0.0_f32,
17164        integrated_xgyro: 0.0_f32,
17165        integrated_ygyro: 0.0_f32,
17166        integrated_zgyro: 0.0_f32,
17167        time_delta_distance_us: 0_u32,
17168        distance: 0.0_f32,
17169        temperature: 0_i16,
17170        sensor_id: 0_u8,
17171        quality: 0_u8,
17172    };
17173    #[cfg(feature = "arbitrary")]
17174    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17175        use arbitrary::{Arbitrary, Unstructured};
17176        let mut buf = [0u8; 1024];
17177        rng.fill_bytes(&mut buf);
17178        let mut unstructured = Unstructured::new(&buf);
17179        Self::arbitrary(&mut unstructured).unwrap_or_default()
17180    }
17181}
17182impl Default for HIL_OPTICAL_FLOW_DATA {
17183    fn default() -> Self {
17184        Self::DEFAULT.clone()
17185    }
17186}
17187impl MessageData for HIL_OPTICAL_FLOW_DATA {
17188    type Message = MavMessage;
17189    const ID: u32 = 114u32;
17190    const NAME: &'static str = "HIL_OPTICAL_FLOW";
17191    const EXTRA_CRC: u8 = 237u8;
17192    const ENCODED_LEN: usize = 44usize;
17193    fn deser(
17194        _version: MavlinkVersion,
17195        __input: &[u8],
17196    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17197        let avail_len = __input.len();
17198        let mut payload_buf = [0; Self::ENCODED_LEN];
17199        let mut buf = if avail_len < Self::ENCODED_LEN {
17200            payload_buf[0..avail_len].copy_from_slice(__input);
17201            Bytes::new(&payload_buf)
17202        } else {
17203            Bytes::new(__input)
17204        };
17205        let mut __struct = Self::default();
17206        __struct.time_usec = buf.get_u64_le()?;
17207        __struct.integration_time_us = buf.get_u32_le()?;
17208        __struct.integrated_x = buf.get_f32_le()?;
17209        __struct.integrated_y = buf.get_f32_le()?;
17210        __struct.integrated_xgyro = buf.get_f32_le()?;
17211        __struct.integrated_ygyro = buf.get_f32_le()?;
17212        __struct.integrated_zgyro = buf.get_f32_le()?;
17213        __struct.time_delta_distance_us = buf.get_u32_le()?;
17214        __struct.distance = buf.get_f32_le()?;
17215        __struct.temperature = buf.get_i16_le()?;
17216        __struct.sensor_id = buf.get_u8()?;
17217        __struct.quality = buf.get_u8()?;
17218        Ok(__struct)
17219    }
17220    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17221        let mut __tmp = BytesMut::new(bytes);
17222        #[allow(clippy::absurd_extreme_comparisons)]
17223        #[allow(unused_comparisons)]
17224        if __tmp.remaining() < Self::ENCODED_LEN {
17225            panic!(
17226                "buffer is too small (need {} bytes, but got {})",
17227                Self::ENCODED_LEN,
17228                __tmp.remaining(),
17229            )
17230        }
17231        __tmp.put_u64_le(self.time_usec);
17232        __tmp.put_u32_le(self.integration_time_us);
17233        __tmp.put_f32_le(self.integrated_x);
17234        __tmp.put_f32_le(self.integrated_y);
17235        __tmp.put_f32_le(self.integrated_xgyro);
17236        __tmp.put_f32_le(self.integrated_ygyro);
17237        __tmp.put_f32_le(self.integrated_zgyro);
17238        __tmp.put_u32_le(self.time_delta_distance_us);
17239        __tmp.put_f32_le(self.distance);
17240        __tmp.put_i16_le(self.temperature);
17241        __tmp.put_u8(self.sensor_id);
17242        __tmp.put_u8(self.quality);
17243        if matches!(version, MavlinkVersion::V2) {
17244            let len = __tmp.len();
17245            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17246        } else {
17247            __tmp.len()
17248        }
17249    }
17250}
17251#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
17252#[doc = ""]
17253#[doc = "ID: 92"]
17254#[derive(Debug, Clone, PartialEq)]
17255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17257#[cfg_attr(feature = "ts", derive(TS))]
17258#[cfg_attr(feature = "ts", ts(export))]
17259pub struct HIL_RC_INPUTS_RAW_DATA {
17260    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17261    pub time_usec: u64,
17262    #[doc = "RC channel 1 value"]
17263    pub chan1_raw: u16,
17264    #[doc = "RC channel 2 value"]
17265    pub chan2_raw: u16,
17266    #[doc = "RC channel 3 value"]
17267    pub chan3_raw: u16,
17268    #[doc = "RC channel 4 value"]
17269    pub chan4_raw: u16,
17270    #[doc = "RC channel 5 value"]
17271    pub chan5_raw: u16,
17272    #[doc = "RC channel 6 value"]
17273    pub chan6_raw: u16,
17274    #[doc = "RC channel 7 value"]
17275    pub chan7_raw: u16,
17276    #[doc = "RC channel 8 value"]
17277    pub chan8_raw: u16,
17278    #[doc = "RC channel 9 value"]
17279    pub chan9_raw: u16,
17280    #[doc = "RC channel 10 value"]
17281    pub chan10_raw: u16,
17282    #[doc = "RC channel 11 value"]
17283    pub chan11_raw: u16,
17284    #[doc = "RC channel 12 value"]
17285    pub chan12_raw: u16,
17286    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
17287    pub rssi: u8,
17288}
17289impl HIL_RC_INPUTS_RAW_DATA {
17290    pub const ENCODED_LEN: usize = 33usize;
17291    pub const DEFAULT: Self = Self {
17292        time_usec: 0_u64,
17293        chan1_raw: 0_u16,
17294        chan2_raw: 0_u16,
17295        chan3_raw: 0_u16,
17296        chan4_raw: 0_u16,
17297        chan5_raw: 0_u16,
17298        chan6_raw: 0_u16,
17299        chan7_raw: 0_u16,
17300        chan8_raw: 0_u16,
17301        chan9_raw: 0_u16,
17302        chan10_raw: 0_u16,
17303        chan11_raw: 0_u16,
17304        chan12_raw: 0_u16,
17305        rssi: 0_u8,
17306    };
17307    #[cfg(feature = "arbitrary")]
17308    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17309        use arbitrary::{Arbitrary, Unstructured};
17310        let mut buf = [0u8; 1024];
17311        rng.fill_bytes(&mut buf);
17312        let mut unstructured = Unstructured::new(&buf);
17313        Self::arbitrary(&mut unstructured).unwrap_or_default()
17314    }
17315}
17316impl Default for HIL_RC_INPUTS_RAW_DATA {
17317    fn default() -> Self {
17318        Self::DEFAULT.clone()
17319    }
17320}
17321impl MessageData for HIL_RC_INPUTS_RAW_DATA {
17322    type Message = MavMessage;
17323    const ID: u32 = 92u32;
17324    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
17325    const EXTRA_CRC: u8 = 54u8;
17326    const ENCODED_LEN: usize = 33usize;
17327    fn deser(
17328        _version: MavlinkVersion,
17329        __input: &[u8],
17330    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17331        let avail_len = __input.len();
17332        let mut payload_buf = [0; Self::ENCODED_LEN];
17333        let mut buf = if avail_len < Self::ENCODED_LEN {
17334            payload_buf[0..avail_len].copy_from_slice(__input);
17335            Bytes::new(&payload_buf)
17336        } else {
17337            Bytes::new(__input)
17338        };
17339        let mut __struct = Self::default();
17340        __struct.time_usec = buf.get_u64_le()?;
17341        __struct.chan1_raw = buf.get_u16_le()?;
17342        __struct.chan2_raw = buf.get_u16_le()?;
17343        __struct.chan3_raw = buf.get_u16_le()?;
17344        __struct.chan4_raw = buf.get_u16_le()?;
17345        __struct.chan5_raw = buf.get_u16_le()?;
17346        __struct.chan6_raw = buf.get_u16_le()?;
17347        __struct.chan7_raw = buf.get_u16_le()?;
17348        __struct.chan8_raw = buf.get_u16_le()?;
17349        __struct.chan9_raw = buf.get_u16_le()?;
17350        __struct.chan10_raw = buf.get_u16_le()?;
17351        __struct.chan11_raw = buf.get_u16_le()?;
17352        __struct.chan12_raw = buf.get_u16_le()?;
17353        __struct.rssi = buf.get_u8()?;
17354        Ok(__struct)
17355    }
17356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17357        let mut __tmp = BytesMut::new(bytes);
17358        #[allow(clippy::absurd_extreme_comparisons)]
17359        #[allow(unused_comparisons)]
17360        if __tmp.remaining() < Self::ENCODED_LEN {
17361            panic!(
17362                "buffer is too small (need {} bytes, but got {})",
17363                Self::ENCODED_LEN,
17364                __tmp.remaining(),
17365            )
17366        }
17367        __tmp.put_u64_le(self.time_usec);
17368        __tmp.put_u16_le(self.chan1_raw);
17369        __tmp.put_u16_le(self.chan2_raw);
17370        __tmp.put_u16_le(self.chan3_raw);
17371        __tmp.put_u16_le(self.chan4_raw);
17372        __tmp.put_u16_le(self.chan5_raw);
17373        __tmp.put_u16_le(self.chan6_raw);
17374        __tmp.put_u16_le(self.chan7_raw);
17375        __tmp.put_u16_le(self.chan8_raw);
17376        __tmp.put_u16_le(self.chan9_raw);
17377        __tmp.put_u16_le(self.chan10_raw);
17378        __tmp.put_u16_le(self.chan11_raw);
17379        __tmp.put_u16_le(self.chan12_raw);
17380        __tmp.put_u8(self.rssi);
17381        if matches!(version, MavlinkVersion::V2) {
17382            let len = __tmp.len();
17383            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17384        } else {
17385            __tmp.len()
17386        }
17387    }
17388}
17389#[doc = "The IMU readings in SI units in NED body frame."]
17390#[doc = ""]
17391#[doc = "ID: 107"]
17392#[derive(Debug, Clone, PartialEq)]
17393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17395#[cfg_attr(feature = "ts", derive(TS))]
17396#[cfg_attr(feature = "ts", ts(export))]
17397pub struct HIL_SENSOR_DATA {
17398    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17399    pub time_usec: u64,
17400    #[doc = "X acceleration"]
17401    pub xacc: f32,
17402    #[doc = "Y acceleration"]
17403    pub yacc: f32,
17404    #[doc = "Z acceleration"]
17405    pub zacc: f32,
17406    #[doc = "Angular speed around X axis in body frame"]
17407    pub xgyro: f32,
17408    #[doc = "Angular speed around Y axis in body frame"]
17409    pub ygyro: f32,
17410    #[doc = "Angular speed around Z axis in body frame"]
17411    pub zgyro: f32,
17412    #[doc = "X Magnetic field"]
17413    pub xmag: f32,
17414    #[doc = "Y Magnetic field"]
17415    pub ymag: f32,
17416    #[doc = "Z Magnetic field"]
17417    pub zmag: f32,
17418    #[doc = "Absolute pressure"]
17419    pub abs_pressure: f32,
17420    #[doc = "Differential pressure (airspeed)"]
17421    pub diff_pressure: f32,
17422    #[doc = "Altitude calculated from pressure"]
17423    pub pressure_alt: f32,
17424    #[doc = "Temperature"]
17425    pub temperature: f32,
17426    #[doc = "Bitmap for fields that have updated since last message"]
17427    pub fields_updated: HilSensorUpdatedFlags,
17428    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
17429    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17430    pub id: u8,
17431}
17432impl HIL_SENSOR_DATA {
17433    pub const ENCODED_LEN: usize = 65usize;
17434    pub const DEFAULT: Self = Self {
17435        time_usec: 0_u64,
17436        xacc: 0.0_f32,
17437        yacc: 0.0_f32,
17438        zacc: 0.0_f32,
17439        xgyro: 0.0_f32,
17440        ygyro: 0.0_f32,
17441        zgyro: 0.0_f32,
17442        xmag: 0.0_f32,
17443        ymag: 0.0_f32,
17444        zmag: 0.0_f32,
17445        abs_pressure: 0.0_f32,
17446        diff_pressure: 0.0_f32,
17447        pressure_alt: 0.0_f32,
17448        temperature: 0.0_f32,
17449        fields_updated: HilSensorUpdatedFlags::DEFAULT,
17450        id: 0_u8,
17451    };
17452    #[cfg(feature = "arbitrary")]
17453    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17454        use arbitrary::{Arbitrary, Unstructured};
17455        let mut buf = [0u8; 1024];
17456        rng.fill_bytes(&mut buf);
17457        let mut unstructured = Unstructured::new(&buf);
17458        Self::arbitrary(&mut unstructured).unwrap_or_default()
17459    }
17460}
17461impl Default for HIL_SENSOR_DATA {
17462    fn default() -> Self {
17463        Self::DEFAULT.clone()
17464    }
17465}
17466impl MessageData for HIL_SENSOR_DATA {
17467    type Message = MavMessage;
17468    const ID: u32 = 107u32;
17469    const NAME: &'static str = "HIL_SENSOR";
17470    const EXTRA_CRC: u8 = 108u8;
17471    const ENCODED_LEN: usize = 65usize;
17472    fn deser(
17473        _version: MavlinkVersion,
17474        __input: &[u8],
17475    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17476        let avail_len = __input.len();
17477        let mut payload_buf = [0; Self::ENCODED_LEN];
17478        let mut buf = if avail_len < Self::ENCODED_LEN {
17479            payload_buf[0..avail_len].copy_from_slice(__input);
17480            Bytes::new(&payload_buf)
17481        } else {
17482            Bytes::new(__input)
17483        };
17484        let mut __struct = Self::default();
17485        __struct.time_usec = buf.get_u64_le()?;
17486        __struct.xacc = buf.get_f32_le()?;
17487        __struct.yacc = buf.get_f32_le()?;
17488        __struct.zacc = buf.get_f32_le()?;
17489        __struct.xgyro = buf.get_f32_le()?;
17490        __struct.ygyro = buf.get_f32_le()?;
17491        __struct.zgyro = buf.get_f32_le()?;
17492        __struct.xmag = buf.get_f32_le()?;
17493        __struct.ymag = buf.get_f32_le()?;
17494        __struct.zmag = buf.get_f32_le()?;
17495        __struct.abs_pressure = buf.get_f32_le()?;
17496        __struct.diff_pressure = buf.get_f32_le()?;
17497        __struct.pressure_alt = buf.get_f32_le()?;
17498        __struct.temperature = buf.get_f32_le()?;
17499        let tmp = buf.get_u32_le()?;
17500        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
17501            tmp as <HilSensorUpdatedFlags as Flags>::Bits,
17502        )
17503        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17504            flag_type: "HilSensorUpdatedFlags",
17505            value: tmp as u64,
17506        })?;
17507        __struct.id = buf.get_u8()?;
17508        Ok(__struct)
17509    }
17510    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17511        let mut __tmp = BytesMut::new(bytes);
17512        #[allow(clippy::absurd_extreme_comparisons)]
17513        #[allow(unused_comparisons)]
17514        if __tmp.remaining() < Self::ENCODED_LEN {
17515            panic!(
17516                "buffer is too small (need {} bytes, but got {})",
17517                Self::ENCODED_LEN,
17518                __tmp.remaining(),
17519            )
17520        }
17521        __tmp.put_u64_le(self.time_usec);
17522        __tmp.put_f32_le(self.xacc);
17523        __tmp.put_f32_le(self.yacc);
17524        __tmp.put_f32_le(self.zacc);
17525        __tmp.put_f32_le(self.xgyro);
17526        __tmp.put_f32_le(self.ygyro);
17527        __tmp.put_f32_le(self.zgyro);
17528        __tmp.put_f32_le(self.xmag);
17529        __tmp.put_f32_le(self.ymag);
17530        __tmp.put_f32_le(self.zmag);
17531        __tmp.put_f32_le(self.abs_pressure);
17532        __tmp.put_f32_le(self.diff_pressure);
17533        __tmp.put_f32_le(self.pressure_alt);
17534        __tmp.put_f32_le(self.temperature);
17535        __tmp.put_u32_le(self.fields_updated.bits() as u32);
17536        if matches!(version, MavlinkVersion::V2) {
17537            __tmp.put_u8(self.id);
17538            let len = __tmp.len();
17539            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17540        } else {
17541            __tmp.len()
17542        }
17543    }
17544}
17545#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
17546#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17547#[doc = ""]
17548#[doc = "ID: 90"]
17549#[derive(Debug, Clone, PartialEq)]
17550#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17551#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17552#[cfg_attr(feature = "ts", derive(TS))]
17553#[cfg_attr(feature = "ts", ts(export))]
17554pub struct HIL_STATE_DATA {
17555    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17556    pub time_usec: u64,
17557    #[doc = "Roll angle"]
17558    pub roll: f32,
17559    #[doc = "Pitch angle"]
17560    pub pitch: f32,
17561    #[doc = "Yaw angle"]
17562    pub yaw: f32,
17563    #[doc = "Body frame roll / phi angular speed"]
17564    pub rollspeed: f32,
17565    #[doc = "Body frame pitch / theta angular speed"]
17566    pub pitchspeed: f32,
17567    #[doc = "Body frame yaw / psi angular speed"]
17568    pub yawspeed: f32,
17569    #[doc = "Latitude"]
17570    pub lat: i32,
17571    #[doc = "Longitude"]
17572    pub lon: i32,
17573    #[doc = "Altitude"]
17574    pub alt: i32,
17575    #[doc = "Ground X Speed (Latitude)"]
17576    pub vx: i16,
17577    #[doc = "Ground Y Speed (Longitude)"]
17578    pub vy: i16,
17579    #[doc = "Ground Z Speed (Altitude)"]
17580    pub vz: i16,
17581    #[doc = "X acceleration"]
17582    pub xacc: i16,
17583    #[doc = "Y acceleration"]
17584    pub yacc: i16,
17585    #[doc = "Z acceleration"]
17586    pub zacc: i16,
17587}
17588impl HIL_STATE_DATA {
17589    pub const ENCODED_LEN: usize = 56usize;
17590    pub const DEFAULT: Self = Self {
17591        time_usec: 0_u64,
17592        roll: 0.0_f32,
17593        pitch: 0.0_f32,
17594        yaw: 0.0_f32,
17595        rollspeed: 0.0_f32,
17596        pitchspeed: 0.0_f32,
17597        yawspeed: 0.0_f32,
17598        lat: 0_i32,
17599        lon: 0_i32,
17600        alt: 0_i32,
17601        vx: 0_i16,
17602        vy: 0_i16,
17603        vz: 0_i16,
17604        xacc: 0_i16,
17605        yacc: 0_i16,
17606        zacc: 0_i16,
17607    };
17608    #[cfg(feature = "arbitrary")]
17609    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17610        use arbitrary::{Arbitrary, Unstructured};
17611        let mut buf = [0u8; 1024];
17612        rng.fill_bytes(&mut buf);
17613        let mut unstructured = Unstructured::new(&buf);
17614        Self::arbitrary(&mut unstructured).unwrap_or_default()
17615    }
17616}
17617impl Default for HIL_STATE_DATA {
17618    fn default() -> Self {
17619        Self::DEFAULT.clone()
17620    }
17621}
17622impl MessageData for HIL_STATE_DATA {
17623    type Message = MavMessage;
17624    const ID: u32 = 90u32;
17625    const NAME: &'static str = "HIL_STATE";
17626    const EXTRA_CRC: u8 = 183u8;
17627    const ENCODED_LEN: usize = 56usize;
17628    fn deser(
17629        _version: MavlinkVersion,
17630        __input: &[u8],
17631    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17632        let avail_len = __input.len();
17633        let mut payload_buf = [0; Self::ENCODED_LEN];
17634        let mut buf = if avail_len < Self::ENCODED_LEN {
17635            payload_buf[0..avail_len].copy_from_slice(__input);
17636            Bytes::new(&payload_buf)
17637        } else {
17638            Bytes::new(__input)
17639        };
17640        let mut __struct = Self::default();
17641        __struct.time_usec = buf.get_u64_le()?;
17642        __struct.roll = buf.get_f32_le()?;
17643        __struct.pitch = buf.get_f32_le()?;
17644        __struct.yaw = buf.get_f32_le()?;
17645        __struct.rollspeed = buf.get_f32_le()?;
17646        __struct.pitchspeed = buf.get_f32_le()?;
17647        __struct.yawspeed = buf.get_f32_le()?;
17648        __struct.lat = buf.get_i32_le()?;
17649        __struct.lon = buf.get_i32_le()?;
17650        __struct.alt = buf.get_i32_le()?;
17651        __struct.vx = buf.get_i16_le()?;
17652        __struct.vy = buf.get_i16_le()?;
17653        __struct.vz = buf.get_i16_le()?;
17654        __struct.xacc = buf.get_i16_le()?;
17655        __struct.yacc = buf.get_i16_le()?;
17656        __struct.zacc = buf.get_i16_le()?;
17657        Ok(__struct)
17658    }
17659    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17660        let mut __tmp = BytesMut::new(bytes);
17661        #[allow(clippy::absurd_extreme_comparisons)]
17662        #[allow(unused_comparisons)]
17663        if __tmp.remaining() < Self::ENCODED_LEN {
17664            panic!(
17665                "buffer is too small (need {} bytes, but got {})",
17666                Self::ENCODED_LEN,
17667                __tmp.remaining(),
17668            )
17669        }
17670        __tmp.put_u64_le(self.time_usec);
17671        __tmp.put_f32_le(self.roll);
17672        __tmp.put_f32_le(self.pitch);
17673        __tmp.put_f32_le(self.yaw);
17674        __tmp.put_f32_le(self.rollspeed);
17675        __tmp.put_f32_le(self.pitchspeed);
17676        __tmp.put_f32_le(self.yawspeed);
17677        __tmp.put_i32_le(self.lat);
17678        __tmp.put_i32_le(self.lon);
17679        __tmp.put_i32_le(self.alt);
17680        __tmp.put_i16_le(self.vx);
17681        __tmp.put_i16_le(self.vy);
17682        __tmp.put_i16_le(self.vz);
17683        __tmp.put_i16_le(self.xacc);
17684        __tmp.put_i16_le(self.yacc);
17685        __tmp.put_i16_le(self.zacc);
17686        if matches!(version, MavlinkVersion::V2) {
17687            let len = __tmp.len();
17688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17689        } else {
17690            __tmp.len()
17691        }
17692    }
17693}
17694#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17695#[doc = ""]
17696#[doc = "ID: 115"]
17697#[derive(Debug, Clone, PartialEq)]
17698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17700#[cfg_attr(feature = "ts", derive(TS))]
17701#[cfg_attr(feature = "ts", ts(export))]
17702pub struct HIL_STATE_QUATERNION_DATA {
17703    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17704    pub time_usec: u64,
17705    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
17706    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17707    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17708    pub attitude_quaternion: [f32; 4],
17709    #[doc = "Body frame roll / phi angular speed"]
17710    pub rollspeed: f32,
17711    #[doc = "Body frame pitch / theta angular speed"]
17712    pub pitchspeed: f32,
17713    #[doc = "Body frame yaw / psi angular speed"]
17714    pub yawspeed: f32,
17715    #[doc = "Latitude"]
17716    pub lat: i32,
17717    #[doc = "Longitude"]
17718    pub lon: i32,
17719    #[doc = "Altitude"]
17720    pub alt: i32,
17721    #[doc = "Ground X Speed (Latitude)"]
17722    pub vx: i16,
17723    #[doc = "Ground Y Speed (Longitude)"]
17724    pub vy: i16,
17725    #[doc = "Ground Z Speed (Altitude)"]
17726    pub vz: i16,
17727    #[doc = "Indicated airspeed"]
17728    pub ind_airspeed: u16,
17729    #[doc = "True airspeed"]
17730    pub true_airspeed: u16,
17731    #[doc = "X acceleration"]
17732    pub xacc: i16,
17733    #[doc = "Y acceleration"]
17734    pub yacc: i16,
17735    #[doc = "Z acceleration"]
17736    pub zacc: i16,
17737}
17738impl HIL_STATE_QUATERNION_DATA {
17739    pub const ENCODED_LEN: usize = 64usize;
17740    pub const DEFAULT: Self = Self {
17741        time_usec: 0_u64,
17742        attitude_quaternion: [0.0_f32; 4usize],
17743        rollspeed: 0.0_f32,
17744        pitchspeed: 0.0_f32,
17745        yawspeed: 0.0_f32,
17746        lat: 0_i32,
17747        lon: 0_i32,
17748        alt: 0_i32,
17749        vx: 0_i16,
17750        vy: 0_i16,
17751        vz: 0_i16,
17752        ind_airspeed: 0_u16,
17753        true_airspeed: 0_u16,
17754        xacc: 0_i16,
17755        yacc: 0_i16,
17756        zacc: 0_i16,
17757    };
17758    #[cfg(feature = "arbitrary")]
17759    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17760        use arbitrary::{Arbitrary, Unstructured};
17761        let mut buf = [0u8; 1024];
17762        rng.fill_bytes(&mut buf);
17763        let mut unstructured = Unstructured::new(&buf);
17764        Self::arbitrary(&mut unstructured).unwrap_or_default()
17765    }
17766}
17767impl Default for HIL_STATE_QUATERNION_DATA {
17768    fn default() -> Self {
17769        Self::DEFAULT.clone()
17770    }
17771}
17772impl MessageData for HIL_STATE_QUATERNION_DATA {
17773    type Message = MavMessage;
17774    const ID: u32 = 115u32;
17775    const NAME: &'static str = "HIL_STATE_QUATERNION";
17776    const EXTRA_CRC: u8 = 4u8;
17777    const ENCODED_LEN: usize = 64usize;
17778    fn deser(
17779        _version: MavlinkVersion,
17780        __input: &[u8],
17781    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17782        let avail_len = __input.len();
17783        let mut payload_buf = [0; Self::ENCODED_LEN];
17784        let mut buf = if avail_len < Self::ENCODED_LEN {
17785            payload_buf[0..avail_len].copy_from_slice(__input);
17786            Bytes::new(&payload_buf)
17787        } else {
17788            Bytes::new(__input)
17789        };
17790        let mut __struct = Self::default();
17791        __struct.time_usec = buf.get_u64_le()?;
17792        for v in &mut __struct.attitude_quaternion {
17793            let val = buf.get_f32_le()?;
17794            *v = val;
17795        }
17796        __struct.rollspeed = buf.get_f32_le()?;
17797        __struct.pitchspeed = buf.get_f32_le()?;
17798        __struct.yawspeed = buf.get_f32_le()?;
17799        __struct.lat = buf.get_i32_le()?;
17800        __struct.lon = buf.get_i32_le()?;
17801        __struct.alt = buf.get_i32_le()?;
17802        __struct.vx = buf.get_i16_le()?;
17803        __struct.vy = buf.get_i16_le()?;
17804        __struct.vz = buf.get_i16_le()?;
17805        __struct.ind_airspeed = buf.get_u16_le()?;
17806        __struct.true_airspeed = buf.get_u16_le()?;
17807        __struct.xacc = buf.get_i16_le()?;
17808        __struct.yacc = buf.get_i16_le()?;
17809        __struct.zacc = buf.get_i16_le()?;
17810        Ok(__struct)
17811    }
17812    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17813        let mut __tmp = BytesMut::new(bytes);
17814        #[allow(clippy::absurd_extreme_comparisons)]
17815        #[allow(unused_comparisons)]
17816        if __tmp.remaining() < Self::ENCODED_LEN {
17817            panic!(
17818                "buffer is too small (need {} bytes, but got {})",
17819                Self::ENCODED_LEN,
17820                __tmp.remaining(),
17821            )
17822        }
17823        __tmp.put_u64_le(self.time_usec);
17824        for val in &self.attitude_quaternion {
17825            __tmp.put_f32_le(*val);
17826        }
17827        __tmp.put_f32_le(self.rollspeed);
17828        __tmp.put_f32_le(self.pitchspeed);
17829        __tmp.put_f32_le(self.yawspeed);
17830        __tmp.put_i32_le(self.lat);
17831        __tmp.put_i32_le(self.lon);
17832        __tmp.put_i32_le(self.alt);
17833        __tmp.put_i16_le(self.vx);
17834        __tmp.put_i16_le(self.vy);
17835        __tmp.put_i16_le(self.vz);
17836        __tmp.put_u16_le(self.ind_airspeed);
17837        __tmp.put_u16_le(self.true_airspeed);
17838        __tmp.put_i16_le(self.xacc);
17839        __tmp.put_i16_le(self.yacc);
17840        __tmp.put_i16_le(self.zacc);
17841        if matches!(version, MavlinkVersion::V2) {
17842            let len = __tmp.len();
17843            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17844        } else {
17845            __tmp.len()
17846        }
17847    }
17848}
17849#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17850#[doc = ""]
17851#[doc = "ID: 242"]
17852#[derive(Debug, Clone, PartialEq)]
17853#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17854#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17855#[cfg_attr(feature = "ts", derive(TS))]
17856#[cfg_attr(feature = "ts", ts(export))]
17857pub struct HOME_POSITION_DATA {
17858    #[doc = "Latitude (WGS84)"]
17859    pub latitude: i32,
17860    #[doc = "Longitude (WGS84)"]
17861    pub longitude: i32,
17862    #[doc = "Altitude (MSL). Positive for up."]
17863    pub altitude: i32,
17864    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17865    pub x: f32,
17866    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17867    pub y: f32,
17868    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17869    pub z: f32,
17870    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17871    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17872    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17873    pub q: [f32; 4],
17874    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17875    pub approach_x: f32,
17876    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17877    pub approach_y: f32,
17878    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17879    pub approach_z: f32,
17880    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17881    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17882    pub time_usec: u64,
17883}
17884impl HOME_POSITION_DATA {
17885    pub const ENCODED_LEN: usize = 60usize;
17886    pub const DEFAULT: Self = Self {
17887        latitude: 0_i32,
17888        longitude: 0_i32,
17889        altitude: 0_i32,
17890        x: 0.0_f32,
17891        y: 0.0_f32,
17892        z: 0.0_f32,
17893        q: [0.0_f32; 4usize],
17894        approach_x: 0.0_f32,
17895        approach_y: 0.0_f32,
17896        approach_z: 0.0_f32,
17897        time_usec: 0_u64,
17898    };
17899    #[cfg(feature = "arbitrary")]
17900    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17901        use arbitrary::{Arbitrary, Unstructured};
17902        let mut buf = [0u8; 1024];
17903        rng.fill_bytes(&mut buf);
17904        let mut unstructured = Unstructured::new(&buf);
17905        Self::arbitrary(&mut unstructured).unwrap_or_default()
17906    }
17907}
17908impl Default for HOME_POSITION_DATA {
17909    fn default() -> Self {
17910        Self::DEFAULT.clone()
17911    }
17912}
17913impl MessageData for HOME_POSITION_DATA {
17914    type Message = MavMessage;
17915    const ID: u32 = 242u32;
17916    const NAME: &'static str = "HOME_POSITION";
17917    const EXTRA_CRC: u8 = 104u8;
17918    const ENCODED_LEN: usize = 60usize;
17919    fn deser(
17920        _version: MavlinkVersion,
17921        __input: &[u8],
17922    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17923        let avail_len = __input.len();
17924        let mut payload_buf = [0; Self::ENCODED_LEN];
17925        let mut buf = if avail_len < Self::ENCODED_LEN {
17926            payload_buf[0..avail_len].copy_from_slice(__input);
17927            Bytes::new(&payload_buf)
17928        } else {
17929            Bytes::new(__input)
17930        };
17931        let mut __struct = Self::default();
17932        __struct.latitude = buf.get_i32_le()?;
17933        __struct.longitude = buf.get_i32_le()?;
17934        __struct.altitude = buf.get_i32_le()?;
17935        __struct.x = buf.get_f32_le()?;
17936        __struct.y = buf.get_f32_le()?;
17937        __struct.z = buf.get_f32_le()?;
17938        for v in &mut __struct.q {
17939            let val = buf.get_f32_le()?;
17940            *v = val;
17941        }
17942        __struct.approach_x = buf.get_f32_le()?;
17943        __struct.approach_y = buf.get_f32_le()?;
17944        __struct.approach_z = buf.get_f32_le()?;
17945        __struct.time_usec = buf.get_u64_le()?;
17946        Ok(__struct)
17947    }
17948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17949        let mut __tmp = BytesMut::new(bytes);
17950        #[allow(clippy::absurd_extreme_comparisons)]
17951        #[allow(unused_comparisons)]
17952        if __tmp.remaining() < Self::ENCODED_LEN {
17953            panic!(
17954                "buffer is too small (need {} bytes, but got {})",
17955                Self::ENCODED_LEN,
17956                __tmp.remaining(),
17957            )
17958        }
17959        __tmp.put_i32_le(self.latitude);
17960        __tmp.put_i32_le(self.longitude);
17961        __tmp.put_i32_le(self.altitude);
17962        __tmp.put_f32_le(self.x);
17963        __tmp.put_f32_le(self.y);
17964        __tmp.put_f32_le(self.z);
17965        for val in &self.q {
17966            __tmp.put_f32_le(*val);
17967        }
17968        __tmp.put_f32_le(self.approach_x);
17969        __tmp.put_f32_le(self.approach_y);
17970        __tmp.put_f32_le(self.approach_z);
17971        if matches!(version, MavlinkVersion::V2) {
17972            __tmp.put_u64_le(self.time_usec);
17973            let len = __tmp.len();
17974            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17975        } else {
17976            __tmp.len()
17977        }
17978    }
17979}
17980#[doc = "Temperature and humidity from hygrometer."]
17981#[doc = ""]
17982#[doc = "ID: 12920"]
17983#[derive(Debug, Clone, PartialEq)]
17984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17985#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17986#[cfg_attr(feature = "ts", derive(TS))]
17987#[cfg_attr(feature = "ts", ts(export))]
17988pub struct HYGROMETER_SENSOR_DATA {
17989    #[doc = "Temperature"]
17990    pub temperature: i16,
17991    #[doc = "Humidity"]
17992    pub humidity: u16,
17993    #[doc = "Hygrometer ID"]
17994    pub id: u8,
17995}
17996impl HYGROMETER_SENSOR_DATA {
17997    pub const ENCODED_LEN: usize = 5usize;
17998    pub const DEFAULT: Self = Self {
17999        temperature: 0_i16,
18000        humidity: 0_u16,
18001        id: 0_u8,
18002    };
18003    #[cfg(feature = "arbitrary")]
18004    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18005        use arbitrary::{Arbitrary, Unstructured};
18006        let mut buf = [0u8; 1024];
18007        rng.fill_bytes(&mut buf);
18008        let mut unstructured = Unstructured::new(&buf);
18009        Self::arbitrary(&mut unstructured).unwrap_or_default()
18010    }
18011}
18012impl Default for HYGROMETER_SENSOR_DATA {
18013    fn default() -> Self {
18014        Self::DEFAULT.clone()
18015    }
18016}
18017impl MessageData for HYGROMETER_SENSOR_DATA {
18018    type Message = MavMessage;
18019    const ID: u32 = 12920u32;
18020    const NAME: &'static str = "HYGROMETER_SENSOR";
18021    const EXTRA_CRC: u8 = 20u8;
18022    const ENCODED_LEN: usize = 5usize;
18023    fn deser(
18024        _version: MavlinkVersion,
18025        __input: &[u8],
18026    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18027        let avail_len = __input.len();
18028        let mut payload_buf = [0; Self::ENCODED_LEN];
18029        let mut buf = if avail_len < Self::ENCODED_LEN {
18030            payload_buf[0..avail_len].copy_from_slice(__input);
18031            Bytes::new(&payload_buf)
18032        } else {
18033            Bytes::new(__input)
18034        };
18035        let mut __struct = Self::default();
18036        __struct.temperature = buf.get_i16_le()?;
18037        __struct.humidity = buf.get_u16_le()?;
18038        __struct.id = buf.get_u8()?;
18039        Ok(__struct)
18040    }
18041    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18042        let mut __tmp = BytesMut::new(bytes);
18043        #[allow(clippy::absurd_extreme_comparisons)]
18044        #[allow(unused_comparisons)]
18045        if __tmp.remaining() < Self::ENCODED_LEN {
18046            panic!(
18047                "buffer is too small (need {} bytes, but got {})",
18048                Self::ENCODED_LEN,
18049                __tmp.remaining(),
18050            )
18051        }
18052        __tmp.put_i16_le(self.temperature);
18053        __tmp.put_u16_le(self.humidity);
18054        __tmp.put_u8(self.id);
18055        if matches!(version, MavlinkVersion::V2) {
18056            let len = __tmp.len();
18057            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18058        } else {
18059            __tmp.len()
18060        }
18061    }
18062}
18063#[doc = "Illuminator status."]
18064#[doc = ""]
18065#[doc = "ID: 440"]
18066#[derive(Debug, Clone, PartialEq)]
18067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18068#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18069#[cfg_attr(feature = "ts", derive(TS))]
18070#[cfg_attr(feature = "ts", ts(export))]
18071pub struct ILLUMINATOR_STATUS_DATA {
18072    #[doc = "Time since the start-up of the illuminator in ms"]
18073    pub uptime_ms: u32,
18074    #[doc = "Errors"]
18075    pub error_status: IlluminatorErrorFlags,
18076    #[doc = "Illuminator brightness"]
18077    pub brightness: f32,
18078    #[doc = "Illuminator strobing period in seconds"]
18079    pub strobe_period: f32,
18080    #[doc = "Illuminator strobing duty cycle"]
18081    pub strobe_duty_cycle: f32,
18082    #[doc = "Temperature in Celsius"]
18083    pub temp_c: f32,
18084    #[doc = "Minimum strobing period in seconds"]
18085    pub min_strobe_period: f32,
18086    #[doc = "Maximum strobing period in seconds"]
18087    pub max_strobe_period: f32,
18088    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
18089    pub enable: u8,
18090    #[doc = "Supported illuminator modes"]
18091    pub mode_bitmask: IlluminatorMode,
18092    #[doc = "Illuminator mode"]
18093    pub mode: IlluminatorMode,
18094}
18095impl ILLUMINATOR_STATUS_DATA {
18096    pub const ENCODED_LEN: usize = 35usize;
18097    pub const DEFAULT: Self = Self {
18098        uptime_ms: 0_u32,
18099        error_status: IlluminatorErrorFlags::DEFAULT,
18100        brightness: 0.0_f32,
18101        strobe_period: 0.0_f32,
18102        strobe_duty_cycle: 0.0_f32,
18103        temp_c: 0.0_f32,
18104        min_strobe_period: 0.0_f32,
18105        max_strobe_period: 0.0_f32,
18106        enable: 0_u8,
18107        mode_bitmask: IlluminatorMode::DEFAULT,
18108        mode: IlluminatorMode::DEFAULT,
18109    };
18110    #[cfg(feature = "arbitrary")]
18111    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18112        use arbitrary::{Arbitrary, Unstructured};
18113        let mut buf = [0u8; 1024];
18114        rng.fill_bytes(&mut buf);
18115        let mut unstructured = Unstructured::new(&buf);
18116        Self::arbitrary(&mut unstructured).unwrap_or_default()
18117    }
18118}
18119impl Default for ILLUMINATOR_STATUS_DATA {
18120    fn default() -> Self {
18121        Self::DEFAULT.clone()
18122    }
18123}
18124impl MessageData for ILLUMINATOR_STATUS_DATA {
18125    type Message = MavMessage;
18126    const ID: u32 = 440u32;
18127    const NAME: &'static str = "ILLUMINATOR_STATUS";
18128    const EXTRA_CRC: u8 = 66u8;
18129    const ENCODED_LEN: usize = 35usize;
18130    fn deser(
18131        _version: MavlinkVersion,
18132        __input: &[u8],
18133    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18134        let avail_len = __input.len();
18135        let mut payload_buf = [0; Self::ENCODED_LEN];
18136        let mut buf = if avail_len < Self::ENCODED_LEN {
18137            payload_buf[0..avail_len].copy_from_slice(__input);
18138            Bytes::new(&payload_buf)
18139        } else {
18140            Bytes::new(__input)
18141        };
18142        let mut __struct = Self::default();
18143        __struct.uptime_ms = buf.get_u32_le()?;
18144        let tmp = buf.get_u32_le()?;
18145        __struct.error_status = IlluminatorErrorFlags::from_bits(
18146            tmp as <IlluminatorErrorFlags as Flags>::Bits,
18147        )
18148        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18149            flag_type: "IlluminatorErrorFlags",
18150            value: tmp as u64,
18151        })?;
18152        __struct.brightness = buf.get_f32_le()?;
18153        __struct.strobe_period = buf.get_f32_le()?;
18154        __struct.strobe_duty_cycle = buf.get_f32_le()?;
18155        __struct.temp_c = buf.get_f32_le()?;
18156        __struct.min_strobe_period = buf.get_f32_le()?;
18157        __struct.max_strobe_period = buf.get_f32_le()?;
18158        __struct.enable = buf.get_u8()?;
18159        let tmp = buf.get_u8()?;
18160        __struct.mode_bitmask =
18161            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18162                enum_type: "IlluminatorMode",
18163                value: tmp as u64,
18164            })?;
18165        let tmp = buf.get_u8()?;
18166        __struct.mode =
18167            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18168                enum_type: "IlluminatorMode",
18169                value: tmp as u64,
18170            })?;
18171        Ok(__struct)
18172    }
18173    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18174        let mut __tmp = BytesMut::new(bytes);
18175        #[allow(clippy::absurd_extreme_comparisons)]
18176        #[allow(unused_comparisons)]
18177        if __tmp.remaining() < Self::ENCODED_LEN {
18178            panic!(
18179                "buffer is too small (need {} bytes, but got {})",
18180                Self::ENCODED_LEN,
18181                __tmp.remaining(),
18182            )
18183        }
18184        __tmp.put_u32_le(self.uptime_ms);
18185        __tmp.put_u32_le(self.error_status.bits() as u32);
18186        __tmp.put_f32_le(self.brightness);
18187        __tmp.put_f32_le(self.strobe_period);
18188        __tmp.put_f32_le(self.strobe_duty_cycle);
18189        __tmp.put_f32_le(self.temp_c);
18190        __tmp.put_f32_le(self.min_strobe_period);
18191        __tmp.put_f32_le(self.max_strobe_period);
18192        __tmp.put_u8(self.enable);
18193        __tmp.put_u8(self.mode_bitmask as u8);
18194        __tmp.put_u8(self.mode as u8);
18195        if matches!(version, MavlinkVersion::V2) {
18196            let len = __tmp.len();
18197            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18198        } else {
18199            __tmp.len()
18200        }
18201    }
18202}
18203#[doc = "Status of the Iridium SBD link."]
18204#[doc = ""]
18205#[doc = "ID: 335"]
18206#[derive(Debug, Clone, PartialEq)]
18207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18209#[cfg_attr(feature = "ts", derive(TS))]
18210#[cfg_attr(feature = "ts", ts(export))]
18211pub struct ISBD_LINK_STATUS_DATA {
18212    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18213    pub timestamp: u64,
18214    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18215    pub last_heartbeat: u64,
18216    #[doc = "Number of failed SBD sessions."]
18217    pub failed_sessions: u16,
18218    #[doc = "Number of successful SBD sessions."]
18219    pub successful_sessions: u16,
18220    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
18221    pub signal_quality: u8,
18222    #[doc = "1: Ring call pending, 0: No call pending."]
18223    pub ring_pending: u8,
18224    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
18225    pub tx_session_pending: u8,
18226    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
18227    pub rx_session_pending: u8,
18228}
18229impl ISBD_LINK_STATUS_DATA {
18230    pub const ENCODED_LEN: usize = 24usize;
18231    pub const DEFAULT: Self = Self {
18232        timestamp: 0_u64,
18233        last_heartbeat: 0_u64,
18234        failed_sessions: 0_u16,
18235        successful_sessions: 0_u16,
18236        signal_quality: 0_u8,
18237        ring_pending: 0_u8,
18238        tx_session_pending: 0_u8,
18239        rx_session_pending: 0_u8,
18240    };
18241    #[cfg(feature = "arbitrary")]
18242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18243        use arbitrary::{Arbitrary, Unstructured};
18244        let mut buf = [0u8; 1024];
18245        rng.fill_bytes(&mut buf);
18246        let mut unstructured = Unstructured::new(&buf);
18247        Self::arbitrary(&mut unstructured).unwrap_or_default()
18248    }
18249}
18250impl Default for ISBD_LINK_STATUS_DATA {
18251    fn default() -> Self {
18252        Self::DEFAULT.clone()
18253    }
18254}
18255impl MessageData for ISBD_LINK_STATUS_DATA {
18256    type Message = MavMessage;
18257    const ID: u32 = 335u32;
18258    const NAME: &'static str = "ISBD_LINK_STATUS";
18259    const EXTRA_CRC: u8 = 225u8;
18260    const ENCODED_LEN: usize = 24usize;
18261    fn deser(
18262        _version: MavlinkVersion,
18263        __input: &[u8],
18264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18265        let avail_len = __input.len();
18266        let mut payload_buf = [0; Self::ENCODED_LEN];
18267        let mut buf = if avail_len < Self::ENCODED_LEN {
18268            payload_buf[0..avail_len].copy_from_slice(__input);
18269            Bytes::new(&payload_buf)
18270        } else {
18271            Bytes::new(__input)
18272        };
18273        let mut __struct = Self::default();
18274        __struct.timestamp = buf.get_u64_le()?;
18275        __struct.last_heartbeat = buf.get_u64_le()?;
18276        __struct.failed_sessions = buf.get_u16_le()?;
18277        __struct.successful_sessions = buf.get_u16_le()?;
18278        __struct.signal_quality = buf.get_u8()?;
18279        __struct.ring_pending = buf.get_u8()?;
18280        __struct.tx_session_pending = buf.get_u8()?;
18281        __struct.rx_session_pending = buf.get_u8()?;
18282        Ok(__struct)
18283    }
18284    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18285        let mut __tmp = BytesMut::new(bytes);
18286        #[allow(clippy::absurd_extreme_comparisons)]
18287        #[allow(unused_comparisons)]
18288        if __tmp.remaining() < Self::ENCODED_LEN {
18289            panic!(
18290                "buffer is too small (need {} bytes, but got {})",
18291                Self::ENCODED_LEN,
18292                __tmp.remaining(),
18293            )
18294        }
18295        __tmp.put_u64_le(self.timestamp);
18296        __tmp.put_u64_le(self.last_heartbeat);
18297        __tmp.put_u16_le(self.failed_sessions);
18298        __tmp.put_u16_le(self.successful_sessions);
18299        __tmp.put_u8(self.signal_quality);
18300        __tmp.put_u8(self.ring_pending);
18301        __tmp.put_u8(self.tx_session_pending);
18302        __tmp.put_u8(self.rx_session_pending);
18303        if matches!(version, MavlinkVersion::V2) {
18304            let len = __tmp.len();
18305            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18306        } else {
18307            __tmp.len()
18308        }
18309    }
18310}
18311#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
18312#[doc = ""]
18313#[doc = "ID: 149"]
18314#[derive(Debug, Clone, PartialEq)]
18315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18317#[cfg_attr(feature = "ts", derive(TS))]
18318#[cfg_attr(feature = "ts", ts(export))]
18319pub struct LANDING_TARGET_DATA {
18320    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18321    pub time_usec: u64,
18322    #[doc = "X-axis angular offset of the target from the center of the image"]
18323    pub angle_x: f32,
18324    #[doc = "Y-axis angular offset of the target from the center of the image"]
18325    pub angle_y: f32,
18326    #[doc = "Distance to the target from the vehicle"]
18327    pub distance: f32,
18328    #[doc = "Size of target along x-axis"]
18329    pub size_x: f32,
18330    #[doc = "Size of target along y-axis"]
18331    pub size_y: f32,
18332    #[doc = "The ID of the target if multiple targets are present"]
18333    pub target_num: u8,
18334    #[doc = "Coordinate frame used for following fields."]
18335    pub frame: MavFrame,
18336    #[doc = "X Position of the landing target in MAV_FRAME"]
18337    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18338    pub x: f32,
18339    #[doc = "Y Position of the landing target in MAV_FRAME"]
18340    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18341    pub y: f32,
18342    #[doc = "Z Position of the landing target in MAV_FRAME"]
18343    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18344    pub z: f32,
18345    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
18346    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18347    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18348    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18349    pub q: [f32; 4],
18350    #[doc = "Type of landing target"]
18351    #[cfg_attr(feature = "serde", serde(default))]
18352    pub mavtype: LandingTargetType,
18353    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
18354    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18355    pub position_valid: u8,
18356}
18357impl LANDING_TARGET_DATA {
18358    pub const ENCODED_LEN: usize = 60usize;
18359    pub const DEFAULT: Self = Self {
18360        time_usec: 0_u64,
18361        angle_x: 0.0_f32,
18362        angle_y: 0.0_f32,
18363        distance: 0.0_f32,
18364        size_x: 0.0_f32,
18365        size_y: 0.0_f32,
18366        target_num: 0_u8,
18367        frame: MavFrame::DEFAULT,
18368        x: 0.0_f32,
18369        y: 0.0_f32,
18370        z: 0.0_f32,
18371        q: [0.0_f32; 4usize],
18372        mavtype: LandingTargetType::DEFAULT,
18373        position_valid: 0_u8,
18374    };
18375    #[cfg(feature = "arbitrary")]
18376    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18377        use arbitrary::{Arbitrary, Unstructured};
18378        let mut buf = [0u8; 1024];
18379        rng.fill_bytes(&mut buf);
18380        let mut unstructured = Unstructured::new(&buf);
18381        Self::arbitrary(&mut unstructured).unwrap_or_default()
18382    }
18383}
18384impl Default for LANDING_TARGET_DATA {
18385    fn default() -> Self {
18386        Self::DEFAULT.clone()
18387    }
18388}
18389impl MessageData for LANDING_TARGET_DATA {
18390    type Message = MavMessage;
18391    const ID: u32 = 149u32;
18392    const NAME: &'static str = "LANDING_TARGET";
18393    const EXTRA_CRC: u8 = 200u8;
18394    const ENCODED_LEN: usize = 60usize;
18395    fn deser(
18396        _version: MavlinkVersion,
18397        __input: &[u8],
18398    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18399        let avail_len = __input.len();
18400        let mut payload_buf = [0; Self::ENCODED_LEN];
18401        let mut buf = if avail_len < Self::ENCODED_LEN {
18402            payload_buf[0..avail_len].copy_from_slice(__input);
18403            Bytes::new(&payload_buf)
18404        } else {
18405            Bytes::new(__input)
18406        };
18407        let mut __struct = Self::default();
18408        __struct.time_usec = buf.get_u64_le()?;
18409        __struct.angle_x = buf.get_f32_le()?;
18410        __struct.angle_y = buf.get_f32_le()?;
18411        __struct.distance = buf.get_f32_le()?;
18412        __struct.size_x = buf.get_f32_le()?;
18413        __struct.size_y = buf.get_f32_le()?;
18414        __struct.target_num = buf.get_u8()?;
18415        let tmp = buf.get_u8()?;
18416        __struct.frame =
18417            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18418                enum_type: "MavFrame",
18419                value: tmp as u64,
18420            })?;
18421        __struct.x = buf.get_f32_le()?;
18422        __struct.y = buf.get_f32_le()?;
18423        __struct.z = buf.get_f32_le()?;
18424        for v in &mut __struct.q {
18425            let val = buf.get_f32_le()?;
18426            *v = val;
18427        }
18428        let tmp = buf.get_u8()?;
18429        __struct.mavtype =
18430            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18431                enum_type: "LandingTargetType",
18432                value: tmp as u64,
18433            })?;
18434        __struct.position_valid = buf.get_u8()?;
18435        Ok(__struct)
18436    }
18437    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18438        let mut __tmp = BytesMut::new(bytes);
18439        #[allow(clippy::absurd_extreme_comparisons)]
18440        #[allow(unused_comparisons)]
18441        if __tmp.remaining() < Self::ENCODED_LEN {
18442            panic!(
18443                "buffer is too small (need {} bytes, but got {})",
18444                Self::ENCODED_LEN,
18445                __tmp.remaining(),
18446            )
18447        }
18448        __tmp.put_u64_le(self.time_usec);
18449        __tmp.put_f32_le(self.angle_x);
18450        __tmp.put_f32_le(self.angle_y);
18451        __tmp.put_f32_le(self.distance);
18452        __tmp.put_f32_le(self.size_x);
18453        __tmp.put_f32_le(self.size_y);
18454        __tmp.put_u8(self.target_num);
18455        __tmp.put_u8(self.frame as u8);
18456        if matches!(version, MavlinkVersion::V2) {
18457            __tmp.put_f32_le(self.x);
18458            __tmp.put_f32_le(self.y);
18459            __tmp.put_f32_le(self.z);
18460            for val in &self.q {
18461                __tmp.put_f32_le(*val);
18462            }
18463            __tmp.put_u8(self.mavtype as u8);
18464            __tmp.put_u8(self.position_valid);
18465            let len = __tmp.len();
18466            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18467        } else {
18468            __tmp.len()
18469        }
18470    }
18471}
18472#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
18473#[doc = ""]
18474#[doc = "ID: 8"]
18475#[derive(Debug, Clone, PartialEq)]
18476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18478#[cfg_attr(feature = "ts", derive(TS))]
18479#[cfg_attr(feature = "ts", ts(export))]
18480pub struct LINK_NODE_STATUS_DATA {
18481    #[doc = "Timestamp (time since system boot)."]
18482    pub timestamp: u64,
18483    #[doc = "Transmit rate"]
18484    pub tx_rate: u32,
18485    #[doc = "Receive rate"]
18486    pub rx_rate: u32,
18487    #[doc = "Messages sent"]
18488    pub messages_sent: u32,
18489    #[doc = "Messages received (estimated from counting seq)"]
18490    pub messages_received: u32,
18491    #[doc = "Messages lost (estimated from counting seq)"]
18492    pub messages_lost: u32,
18493    #[doc = "Number of bytes that could not be parsed correctly."]
18494    pub rx_parse_err: u16,
18495    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18496    pub tx_overflows: u16,
18497    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18498    pub rx_overflows: u16,
18499    #[doc = "Remaining free transmit buffer space"]
18500    pub tx_buf: u8,
18501    #[doc = "Remaining free receive buffer space"]
18502    pub rx_buf: u8,
18503}
18504impl LINK_NODE_STATUS_DATA {
18505    pub const ENCODED_LEN: usize = 36usize;
18506    pub const DEFAULT: Self = Self {
18507        timestamp: 0_u64,
18508        tx_rate: 0_u32,
18509        rx_rate: 0_u32,
18510        messages_sent: 0_u32,
18511        messages_received: 0_u32,
18512        messages_lost: 0_u32,
18513        rx_parse_err: 0_u16,
18514        tx_overflows: 0_u16,
18515        rx_overflows: 0_u16,
18516        tx_buf: 0_u8,
18517        rx_buf: 0_u8,
18518    };
18519    #[cfg(feature = "arbitrary")]
18520    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18521        use arbitrary::{Arbitrary, Unstructured};
18522        let mut buf = [0u8; 1024];
18523        rng.fill_bytes(&mut buf);
18524        let mut unstructured = Unstructured::new(&buf);
18525        Self::arbitrary(&mut unstructured).unwrap_or_default()
18526    }
18527}
18528impl Default for LINK_NODE_STATUS_DATA {
18529    fn default() -> Self {
18530        Self::DEFAULT.clone()
18531    }
18532}
18533impl MessageData for LINK_NODE_STATUS_DATA {
18534    type Message = MavMessage;
18535    const ID: u32 = 8u32;
18536    const NAME: &'static str = "LINK_NODE_STATUS";
18537    const EXTRA_CRC: u8 = 117u8;
18538    const ENCODED_LEN: usize = 36usize;
18539    fn deser(
18540        _version: MavlinkVersion,
18541        __input: &[u8],
18542    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18543        let avail_len = __input.len();
18544        let mut payload_buf = [0; Self::ENCODED_LEN];
18545        let mut buf = if avail_len < Self::ENCODED_LEN {
18546            payload_buf[0..avail_len].copy_from_slice(__input);
18547            Bytes::new(&payload_buf)
18548        } else {
18549            Bytes::new(__input)
18550        };
18551        let mut __struct = Self::default();
18552        __struct.timestamp = buf.get_u64_le()?;
18553        __struct.tx_rate = buf.get_u32_le()?;
18554        __struct.rx_rate = buf.get_u32_le()?;
18555        __struct.messages_sent = buf.get_u32_le()?;
18556        __struct.messages_received = buf.get_u32_le()?;
18557        __struct.messages_lost = buf.get_u32_le()?;
18558        __struct.rx_parse_err = buf.get_u16_le()?;
18559        __struct.tx_overflows = buf.get_u16_le()?;
18560        __struct.rx_overflows = buf.get_u16_le()?;
18561        __struct.tx_buf = buf.get_u8()?;
18562        __struct.rx_buf = buf.get_u8()?;
18563        Ok(__struct)
18564    }
18565    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18566        let mut __tmp = BytesMut::new(bytes);
18567        #[allow(clippy::absurd_extreme_comparisons)]
18568        #[allow(unused_comparisons)]
18569        if __tmp.remaining() < Self::ENCODED_LEN {
18570            panic!(
18571                "buffer is too small (need {} bytes, but got {})",
18572                Self::ENCODED_LEN,
18573                __tmp.remaining(),
18574            )
18575        }
18576        __tmp.put_u64_le(self.timestamp);
18577        __tmp.put_u32_le(self.tx_rate);
18578        __tmp.put_u32_le(self.rx_rate);
18579        __tmp.put_u32_le(self.messages_sent);
18580        __tmp.put_u32_le(self.messages_received);
18581        __tmp.put_u32_le(self.messages_lost);
18582        __tmp.put_u16_le(self.rx_parse_err);
18583        __tmp.put_u16_le(self.tx_overflows);
18584        __tmp.put_u16_le(self.rx_overflows);
18585        __tmp.put_u8(self.tx_buf);
18586        __tmp.put_u8(self.rx_buf);
18587        if matches!(version, MavlinkVersion::V2) {
18588            let len = __tmp.len();
18589            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18590        } else {
18591            __tmp.len()
18592        }
18593    }
18594}
18595#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18596#[doc = ""]
18597#[doc = "ID: 32"]
18598#[derive(Debug, Clone, PartialEq)]
18599#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18601#[cfg_attr(feature = "ts", derive(TS))]
18602#[cfg_attr(feature = "ts", ts(export))]
18603pub struct LOCAL_POSITION_NED_DATA {
18604    #[doc = "Timestamp (time since system boot)."]
18605    pub time_boot_ms: u32,
18606    #[doc = "X Position"]
18607    pub x: f32,
18608    #[doc = "Y Position"]
18609    pub y: f32,
18610    #[doc = "Z Position"]
18611    pub z: f32,
18612    #[doc = "X Speed"]
18613    pub vx: f32,
18614    #[doc = "Y Speed"]
18615    pub vy: f32,
18616    #[doc = "Z Speed"]
18617    pub vz: f32,
18618}
18619impl LOCAL_POSITION_NED_DATA {
18620    pub const ENCODED_LEN: usize = 28usize;
18621    pub const DEFAULT: Self = Self {
18622        time_boot_ms: 0_u32,
18623        x: 0.0_f32,
18624        y: 0.0_f32,
18625        z: 0.0_f32,
18626        vx: 0.0_f32,
18627        vy: 0.0_f32,
18628        vz: 0.0_f32,
18629    };
18630    #[cfg(feature = "arbitrary")]
18631    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18632        use arbitrary::{Arbitrary, Unstructured};
18633        let mut buf = [0u8; 1024];
18634        rng.fill_bytes(&mut buf);
18635        let mut unstructured = Unstructured::new(&buf);
18636        Self::arbitrary(&mut unstructured).unwrap_or_default()
18637    }
18638}
18639impl Default for LOCAL_POSITION_NED_DATA {
18640    fn default() -> Self {
18641        Self::DEFAULT.clone()
18642    }
18643}
18644impl MessageData for LOCAL_POSITION_NED_DATA {
18645    type Message = MavMessage;
18646    const ID: u32 = 32u32;
18647    const NAME: &'static str = "LOCAL_POSITION_NED";
18648    const EXTRA_CRC: u8 = 185u8;
18649    const ENCODED_LEN: usize = 28usize;
18650    fn deser(
18651        _version: MavlinkVersion,
18652        __input: &[u8],
18653    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18654        let avail_len = __input.len();
18655        let mut payload_buf = [0; Self::ENCODED_LEN];
18656        let mut buf = if avail_len < Self::ENCODED_LEN {
18657            payload_buf[0..avail_len].copy_from_slice(__input);
18658            Bytes::new(&payload_buf)
18659        } else {
18660            Bytes::new(__input)
18661        };
18662        let mut __struct = Self::default();
18663        __struct.time_boot_ms = buf.get_u32_le()?;
18664        __struct.x = buf.get_f32_le()?;
18665        __struct.y = buf.get_f32_le()?;
18666        __struct.z = buf.get_f32_le()?;
18667        __struct.vx = buf.get_f32_le()?;
18668        __struct.vy = buf.get_f32_le()?;
18669        __struct.vz = buf.get_f32_le()?;
18670        Ok(__struct)
18671    }
18672    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18673        let mut __tmp = BytesMut::new(bytes);
18674        #[allow(clippy::absurd_extreme_comparisons)]
18675        #[allow(unused_comparisons)]
18676        if __tmp.remaining() < Self::ENCODED_LEN {
18677            panic!(
18678                "buffer is too small (need {} bytes, but got {})",
18679                Self::ENCODED_LEN,
18680                __tmp.remaining(),
18681            )
18682        }
18683        __tmp.put_u32_le(self.time_boot_ms);
18684        __tmp.put_f32_le(self.x);
18685        __tmp.put_f32_le(self.y);
18686        __tmp.put_f32_le(self.z);
18687        __tmp.put_f32_le(self.vx);
18688        __tmp.put_f32_le(self.vy);
18689        __tmp.put_f32_le(self.vz);
18690        if matches!(version, MavlinkVersion::V2) {
18691            let len = __tmp.len();
18692            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18693        } else {
18694            __tmp.len()
18695        }
18696    }
18697}
18698#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18699#[doc = ""]
18700#[doc = "ID: 64"]
18701#[derive(Debug, Clone, PartialEq)]
18702#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18704#[cfg_attr(feature = "ts", derive(TS))]
18705#[cfg_attr(feature = "ts", ts(export))]
18706pub struct LOCAL_POSITION_NED_COV_DATA {
18707    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18708    pub time_usec: u64,
18709    #[doc = "X Position"]
18710    pub x: f32,
18711    #[doc = "Y Position"]
18712    pub y: f32,
18713    #[doc = "Z Position"]
18714    pub z: f32,
18715    #[doc = "X Speed"]
18716    pub vx: f32,
18717    #[doc = "Y Speed"]
18718    pub vy: f32,
18719    #[doc = "Z Speed"]
18720    pub vz: f32,
18721    #[doc = "X Acceleration"]
18722    pub ax: f32,
18723    #[doc = "Y Acceleration"]
18724    pub ay: f32,
18725    #[doc = "Z Acceleration"]
18726    pub az: f32,
18727    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
18728    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18729    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18730    pub covariance: [f32; 45],
18731    #[doc = "Class id of the estimator this estimate originated from."]
18732    pub estimator_type: MavEstimatorType,
18733}
18734impl LOCAL_POSITION_NED_COV_DATA {
18735    pub const ENCODED_LEN: usize = 225usize;
18736    pub const DEFAULT: Self = Self {
18737        time_usec: 0_u64,
18738        x: 0.0_f32,
18739        y: 0.0_f32,
18740        z: 0.0_f32,
18741        vx: 0.0_f32,
18742        vy: 0.0_f32,
18743        vz: 0.0_f32,
18744        ax: 0.0_f32,
18745        ay: 0.0_f32,
18746        az: 0.0_f32,
18747        covariance: [0.0_f32; 45usize],
18748        estimator_type: MavEstimatorType::DEFAULT,
18749    };
18750    #[cfg(feature = "arbitrary")]
18751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18752        use arbitrary::{Arbitrary, Unstructured};
18753        let mut buf = [0u8; 1024];
18754        rng.fill_bytes(&mut buf);
18755        let mut unstructured = Unstructured::new(&buf);
18756        Self::arbitrary(&mut unstructured).unwrap_or_default()
18757    }
18758}
18759impl Default for LOCAL_POSITION_NED_COV_DATA {
18760    fn default() -> Self {
18761        Self::DEFAULT.clone()
18762    }
18763}
18764impl MessageData for LOCAL_POSITION_NED_COV_DATA {
18765    type Message = MavMessage;
18766    const ID: u32 = 64u32;
18767    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
18768    const EXTRA_CRC: u8 = 191u8;
18769    const ENCODED_LEN: usize = 225usize;
18770    fn deser(
18771        _version: MavlinkVersion,
18772        __input: &[u8],
18773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18774        let avail_len = __input.len();
18775        let mut payload_buf = [0; Self::ENCODED_LEN];
18776        let mut buf = if avail_len < Self::ENCODED_LEN {
18777            payload_buf[0..avail_len].copy_from_slice(__input);
18778            Bytes::new(&payload_buf)
18779        } else {
18780            Bytes::new(__input)
18781        };
18782        let mut __struct = Self::default();
18783        __struct.time_usec = buf.get_u64_le()?;
18784        __struct.x = buf.get_f32_le()?;
18785        __struct.y = buf.get_f32_le()?;
18786        __struct.z = buf.get_f32_le()?;
18787        __struct.vx = buf.get_f32_le()?;
18788        __struct.vy = buf.get_f32_le()?;
18789        __struct.vz = buf.get_f32_le()?;
18790        __struct.ax = buf.get_f32_le()?;
18791        __struct.ay = buf.get_f32_le()?;
18792        __struct.az = buf.get_f32_le()?;
18793        for v in &mut __struct.covariance {
18794            let val = buf.get_f32_le()?;
18795            *v = val;
18796        }
18797        let tmp = buf.get_u8()?;
18798        __struct.estimator_type =
18799            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18800                enum_type: "MavEstimatorType",
18801                value: tmp as u64,
18802            })?;
18803        Ok(__struct)
18804    }
18805    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18806        let mut __tmp = BytesMut::new(bytes);
18807        #[allow(clippy::absurd_extreme_comparisons)]
18808        #[allow(unused_comparisons)]
18809        if __tmp.remaining() < Self::ENCODED_LEN {
18810            panic!(
18811                "buffer is too small (need {} bytes, but got {})",
18812                Self::ENCODED_LEN,
18813                __tmp.remaining(),
18814            )
18815        }
18816        __tmp.put_u64_le(self.time_usec);
18817        __tmp.put_f32_le(self.x);
18818        __tmp.put_f32_le(self.y);
18819        __tmp.put_f32_le(self.z);
18820        __tmp.put_f32_le(self.vx);
18821        __tmp.put_f32_le(self.vy);
18822        __tmp.put_f32_le(self.vz);
18823        __tmp.put_f32_le(self.ax);
18824        __tmp.put_f32_le(self.ay);
18825        __tmp.put_f32_le(self.az);
18826        for val in &self.covariance {
18827            __tmp.put_f32_le(*val);
18828        }
18829        __tmp.put_u8(self.estimator_type as u8);
18830        if matches!(version, MavlinkVersion::V2) {
18831            let len = __tmp.len();
18832            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18833        } else {
18834            __tmp.len()
18835        }
18836    }
18837}
18838#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18839#[doc = ""]
18840#[doc = "ID: 89"]
18841#[derive(Debug, Clone, PartialEq)]
18842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18844#[cfg_attr(feature = "ts", derive(TS))]
18845#[cfg_attr(feature = "ts", ts(export))]
18846pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18847    #[doc = "Timestamp (time since system boot)."]
18848    pub time_boot_ms: u32,
18849    #[doc = "X Position"]
18850    pub x: f32,
18851    #[doc = "Y Position"]
18852    pub y: f32,
18853    #[doc = "Z Position"]
18854    pub z: f32,
18855    #[doc = "Roll"]
18856    pub roll: f32,
18857    #[doc = "Pitch"]
18858    pub pitch: f32,
18859    #[doc = "Yaw"]
18860    pub yaw: f32,
18861}
18862impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18863    pub const ENCODED_LEN: usize = 28usize;
18864    pub const DEFAULT: Self = Self {
18865        time_boot_ms: 0_u32,
18866        x: 0.0_f32,
18867        y: 0.0_f32,
18868        z: 0.0_f32,
18869        roll: 0.0_f32,
18870        pitch: 0.0_f32,
18871        yaw: 0.0_f32,
18872    };
18873    #[cfg(feature = "arbitrary")]
18874    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18875        use arbitrary::{Arbitrary, Unstructured};
18876        let mut buf = [0u8; 1024];
18877        rng.fill_bytes(&mut buf);
18878        let mut unstructured = Unstructured::new(&buf);
18879        Self::arbitrary(&mut unstructured).unwrap_or_default()
18880    }
18881}
18882impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18883    fn default() -> Self {
18884        Self::DEFAULT.clone()
18885    }
18886}
18887impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18888    type Message = MavMessage;
18889    const ID: u32 = 89u32;
18890    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18891    const EXTRA_CRC: u8 = 231u8;
18892    const ENCODED_LEN: usize = 28usize;
18893    fn deser(
18894        _version: MavlinkVersion,
18895        __input: &[u8],
18896    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18897        let avail_len = __input.len();
18898        let mut payload_buf = [0; Self::ENCODED_LEN];
18899        let mut buf = if avail_len < Self::ENCODED_LEN {
18900            payload_buf[0..avail_len].copy_from_slice(__input);
18901            Bytes::new(&payload_buf)
18902        } else {
18903            Bytes::new(__input)
18904        };
18905        let mut __struct = Self::default();
18906        __struct.time_boot_ms = buf.get_u32_le()?;
18907        __struct.x = buf.get_f32_le()?;
18908        __struct.y = buf.get_f32_le()?;
18909        __struct.z = buf.get_f32_le()?;
18910        __struct.roll = buf.get_f32_le()?;
18911        __struct.pitch = buf.get_f32_le()?;
18912        __struct.yaw = buf.get_f32_le()?;
18913        Ok(__struct)
18914    }
18915    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18916        let mut __tmp = BytesMut::new(bytes);
18917        #[allow(clippy::absurd_extreme_comparisons)]
18918        #[allow(unused_comparisons)]
18919        if __tmp.remaining() < Self::ENCODED_LEN {
18920            panic!(
18921                "buffer is too small (need {} bytes, but got {})",
18922                Self::ENCODED_LEN,
18923                __tmp.remaining(),
18924            )
18925        }
18926        __tmp.put_u32_le(self.time_boot_ms);
18927        __tmp.put_f32_le(self.x);
18928        __tmp.put_f32_le(self.y);
18929        __tmp.put_f32_le(self.z);
18930        __tmp.put_f32_le(self.roll);
18931        __tmp.put_f32_le(self.pitch);
18932        __tmp.put_f32_le(self.yaw);
18933        if matches!(version, MavlinkVersion::V2) {
18934            let len = __tmp.len();
18935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18936        } else {
18937            __tmp.len()
18938        }
18939    }
18940}
18941#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18942#[doc = ""]
18943#[doc = "ID: 268"]
18944#[derive(Debug, Clone, PartialEq)]
18945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18947#[cfg_attr(feature = "ts", derive(TS))]
18948#[cfg_attr(feature = "ts", ts(export))]
18949pub struct LOGGING_ACK_DATA {
18950    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18951    pub sequence: u16,
18952    #[doc = "system ID of the target"]
18953    pub target_system: u8,
18954    #[doc = "component ID of the target"]
18955    pub target_component: u8,
18956}
18957impl LOGGING_ACK_DATA {
18958    pub const ENCODED_LEN: usize = 4usize;
18959    pub const DEFAULT: Self = Self {
18960        sequence: 0_u16,
18961        target_system: 0_u8,
18962        target_component: 0_u8,
18963    };
18964    #[cfg(feature = "arbitrary")]
18965    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18966        use arbitrary::{Arbitrary, Unstructured};
18967        let mut buf = [0u8; 1024];
18968        rng.fill_bytes(&mut buf);
18969        let mut unstructured = Unstructured::new(&buf);
18970        Self::arbitrary(&mut unstructured).unwrap_or_default()
18971    }
18972}
18973impl Default for LOGGING_ACK_DATA {
18974    fn default() -> Self {
18975        Self::DEFAULT.clone()
18976    }
18977}
18978impl MessageData for LOGGING_ACK_DATA {
18979    type Message = MavMessage;
18980    const ID: u32 = 268u32;
18981    const NAME: &'static str = "LOGGING_ACK";
18982    const EXTRA_CRC: u8 = 14u8;
18983    const ENCODED_LEN: usize = 4usize;
18984    fn deser(
18985        _version: MavlinkVersion,
18986        __input: &[u8],
18987    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18988        let avail_len = __input.len();
18989        let mut payload_buf = [0; Self::ENCODED_LEN];
18990        let mut buf = if avail_len < Self::ENCODED_LEN {
18991            payload_buf[0..avail_len].copy_from_slice(__input);
18992            Bytes::new(&payload_buf)
18993        } else {
18994            Bytes::new(__input)
18995        };
18996        let mut __struct = Self::default();
18997        __struct.sequence = buf.get_u16_le()?;
18998        __struct.target_system = buf.get_u8()?;
18999        __struct.target_component = buf.get_u8()?;
19000        Ok(__struct)
19001    }
19002    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19003        let mut __tmp = BytesMut::new(bytes);
19004        #[allow(clippy::absurd_extreme_comparisons)]
19005        #[allow(unused_comparisons)]
19006        if __tmp.remaining() < Self::ENCODED_LEN {
19007            panic!(
19008                "buffer is too small (need {} bytes, but got {})",
19009                Self::ENCODED_LEN,
19010                __tmp.remaining(),
19011            )
19012        }
19013        __tmp.put_u16_le(self.sequence);
19014        __tmp.put_u8(self.target_system);
19015        __tmp.put_u8(self.target_component);
19016        if matches!(version, MavlinkVersion::V2) {
19017            let len = __tmp.len();
19018            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19019        } else {
19020            __tmp.len()
19021        }
19022    }
19023}
19024#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
19025#[doc = ""]
19026#[doc = "ID: 266"]
19027#[derive(Debug, Clone, PartialEq)]
19028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19030#[cfg_attr(feature = "ts", derive(TS))]
19031#[cfg_attr(feature = "ts", ts(export))]
19032pub struct LOGGING_DATA_DATA {
19033    #[doc = "sequence number (can wrap)"]
19034    pub sequence: u16,
19035    #[doc = "system ID of the target"]
19036    pub target_system: u8,
19037    #[doc = "component ID of the target"]
19038    pub target_component: u8,
19039    #[doc = "data length"]
19040    pub length: u8,
19041    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
19042    pub first_message_offset: u8,
19043    #[doc = "logged data"]
19044    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19045    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19046    pub data: [u8; 249],
19047}
19048impl LOGGING_DATA_DATA {
19049    pub const ENCODED_LEN: usize = 255usize;
19050    pub const DEFAULT: Self = Self {
19051        sequence: 0_u16,
19052        target_system: 0_u8,
19053        target_component: 0_u8,
19054        length: 0_u8,
19055        first_message_offset: 0_u8,
19056        data: [0_u8; 249usize],
19057    };
19058    #[cfg(feature = "arbitrary")]
19059    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19060        use arbitrary::{Arbitrary, Unstructured};
19061        let mut buf = [0u8; 1024];
19062        rng.fill_bytes(&mut buf);
19063        let mut unstructured = Unstructured::new(&buf);
19064        Self::arbitrary(&mut unstructured).unwrap_or_default()
19065    }
19066}
19067impl Default for LOGGING_DATA_DATA {
19068    fn default() -> Self {
19069        Self::DEFAULT.clone()
19070    }
19071}
19072impl MessageData for LOGGING_DATA_DATA {
19073    type Message = MavMessage;
19074    const ID: u32 = 266u32;
19075    const NAME: &'static str = "LOGGING_DATA";
19076    const EXTRA_CRC: u8 = 193u8;
19077    const ENCODED_LEN: usize = 255usize;
19078    fn deser(
19079        _version: MavlinkVersion,
19080        __input: &[u8],
19081    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19082        let avail_len = __input.len();
19083        let mut payload_buf = [0; Self::ENCODED_LEN];
19084        let mut buf = if avail_len < Self::ENCODED_LEN {
19085            payload_buf[0..avail_len].copy_from_slice(__input);
19086            Bytes::new(&payload_buf)
19087        } else {
19088            Bytes::new(__input)
19089        };
19090        let mut __struct = Self::default();
19091        __struct.sequence = buf.get_u16_le()?;
19092        __struct.target_system = buf.get_u8()?;
19093        __struct.target_component = buf.get_u8()?;
19094        __struct.length = buf.get_u8()?;
19095        __struct.first_message_offset = buf.get_u8()?;
19096        for v in &mut __struct.data {
19097            let val = buf.get_u8()?;
19098            *v = val;
19099        }
19100        Ok(__struct)
19101    }
19102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19103        let mut __tmp = BytesMut::new(bytes);
19104        #[allow(clippy::absurd_extreme_comparisons)]
19105        #[allow(unused_comparisons)]
19106        if __tmp.remaining() < Self::ENCODED_LEN {
19107            panic!(
19108                "buffer is too small (need {} bytes, but got {})",
19109                Self::ENCODED_LEN,
19110                __tmp.remaining(),
19111            )
19112        }
19113        __tmp.put_u16_le(self.sequence);
19114        __tmp.put_u8(self.target_system);
19115        __tmp.put_u8(self.target_component);
19116        __tmp.put_u8(self.length);
19117        __tmp.put_u8(self.first_message_offset);
19118        for val in &self.data {
19119            __tmp.put_u8(*val);
19120        }
19121        if matches!(version, MavlinkVersion::V2) {
19122            let len = __tmp.len();
19123            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19124        } else {
19125            __tmp.len()
19126        }
19127    }
19128}
19129#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
19130#[doc = ""]
19131#[doc = "ID: 267"]
19132#[derive(Debug, Clone, PartialEq)]
19133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19135#[cfg_attr(feature = "ts", derive(TS))]
19136#[cfg_attr(feature = "ts", ts(export))]
19137pub struct LOGGING_DATA_ACKED_DATA {
19138    #[doc = "sequence number (can wrap)"]
19139    pub sequence: u16,
19140    #[doc = "system ID of the target"]
19141    pub target_system: u8,
19142    #[doc = "component ID of the target"]
19143    pub target_component: u8,
19144    #[doc = "data length"]
19145    pub length: u8,
19146    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
19147    pub first_message_offset: u8,
19148    #[doc = "logged data"]
19149    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19150    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19151    pub data: [u8; 249],
19152}
19153impl LOGGING_DATA_ACKED_DATA {
19154    pub const ENCODED_LEN: usize = 255usize;
19155    pub const DEFAULT: Self = Self {
19156        sequence: 0_u16,
19157        target_system: 0_u8,
19158        target_component: 0_u8,
19159        length: 0_u8,
19160        first_message_offset: 0_u8,
19161        data: [0_u8; 249usize],
19162    };
19163    #[cfg(feature = "arbitrary")]
19164    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19165        use arbitrary::{Arbitrary, Unstructured};
19166        let mut buf = [0u8; 1024];
19167        rng.fill_bytes(&mut buf);
19168        let mut unstructured = Unstructured::new(&buf);
19169        Self::arbitrary(&mut unstructured).unwrap_or_default()
19170    }
19171}
19172impl Default for LOGGING_DATA_ACKED_DATA {
19173    fn default() -> Self {
19174        Self::DEFAULT.clone()
19175    }
19176}
19177impl MessageData for LOGGING_DATA_ACKED_DATA {
19178    type Message = MavMessage;
19179    const ID: u32 = 267u32;
19180    const NAME: &'static str = "LOGGING_DATA_ACKED";
19181    const EXTRA_CRC: u8 = 35u8;
19182    const ENCODED_LEN: usize = 255usize;
19183    fn deser(
19184        _version: MavlinkVersion,
19185        __input: &[u8],
19186    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19187        let avail_len = __input.len();
19188        let mut payload_buf = [0; Self::ENCODED_LEN];
19189        let mut buf = if avail_len < Self::ENCODED_LEN {
19190            payload_buf[0..avail_len].copy_from_slice(__input);
19191            Bytes::new(&payload_buf)
19192        } else {
19193            Bytes::new(__input)
19194        };
19195        let mut __struct = Self::default();
19196        __struct.sequence = buf.get_u16_le()?;
19197        __struct.target_system = buf.get_u8()?;
19198        __struct.target_component = buf.get_u8()?;
19199        __struct.length = buf.get_u8()?;
19200        __struct.first_message_offset = buf.get_u8()?;
19201        for v in &mut __struct.data {
19202            let val = buf.get_u8()?;
19203            *v = val;
19204        }
19205        Ok(__struct)
19206    }
19207    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19208        let mut __tmp = BytesMut::new(bytes);
19209        #[allow(clippy::absurd_extreme_comparisons)]
19210        #[allow(unused_comparisons)]
19211        if __tmp.remaining() < Self::ENCODED_LEN {
19212            panic!(
19213                "buffer is too small (need {} bytes, but got {})",
19214                Self::ENCODED_LEN,
19215                __tmp.remaining(),
19216            )
19217        }
19218        __tmp.put_u16_le(self.sequence);
19219        __tmp.put_u8(self.target_system);
19220        __tmp.put_u8(self.target_component);
19221        __tmp.put_u8(self.length);
19222        __tmp.put_u8(self.first_message_offset);
19223        for val in &self.data {
19224            __tmp.put_u8(*val);
19225        }
19226        if matches!(version, MavlinkVersion::V2) {
19227            let len = __tmp.len();
19228            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19229        } else {
19230            __tmp.len()
19231        }
19232    }
19233}
19234#[doc = "Reply to LOG_REQUEST_DATA."]
19235#[doc = ""]
19236#[doc = "ID: 120"]
19237#[derive(Debug, Clone, PartialEq)]
19238#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19239#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19240#[cfg_attr(feature = "ts", derive(TS))]
19241#[cfg_attr(feature = "ts", ts(export))]
19242pub struct LOG_DATA_DATA {
19243    #[doc = "Offset into the log"]
19244    pub ofs: u32,
19245    #[doc = "Log id (from LOG_ENTRY reply)"]
19246    pub id: u16,
19247    #[doc = "Number of bytes (zero for end of log)"]
19248    pub count: u8,
19249    #[doc = "log data"]
19250    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19251    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19252    pub data: [u8; 90],
19253}
19254impl LOG_DATA_DATA {
19255    pub const ENCODED_LEN: usize = 97usize;
19256    pub const DEFAULT: Self = Self {
19257        ofs: 0_u32,
19258        id: 0_u16,
19259        count: 0_u8,
19260        data: [0_u8; 90usize],
19261    };
19262    #[cfg(feature = "arbitrary")]
19263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19264        use arbitrary::{Arbitrary, Unstructured};
19265        let mut buf = [0u8; 1024];
19266        rng.fill_bytes(&mut buf);
19267        let mut unstructured = Unstructured::new(&buf);
19268        Self::arbitrary(&mut unstructured).unwrap_or_default()
19269    }
19270}
19271impl Default for LOG_DATA_DATA {
19272    fn default() -> Self {
19273        Self::DEFAULT.clone()
19274    }
19275}
19276impl MessageData for LOG_DATA_DATA {
19277    type Message = MavMessage;
19278    const ID: u32 = 120u32;
19279    const NAME: &'static str = "LOG_DATA";
19280    const EXTRA_CRC: u8 = 134u8;
19281    const ENCODED_LEN: usize = 97usize;
19282    fn deser(
19283        _version: MavlinkVersion,
19284        __input: &[u8],
19285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19286        let avail_len = __input.len();
19287        let mut payload_buf = [0; Self::ENCODED_LEN];
19288        let mut buf = if avail_len < Self::ENCODED_LEN {
19289            payload_buf[0..avail_len].copy_from_slice(__input);
19290            Bytes::new(&payload_buf)
19291        } else {
19292            Bytes::new(__input)
19293        };
19294        let mut __struct = Self::default();
19295        __struct.ofs = buf.get_u32_le()?;
19296        __struct.id = buf.get_u16_le()?;
19297        __struct.count = buf.get_u8()?;
19298        for v in &mut __struct.data {
19299            let val = buf.get_u8()?;
19300            *v = val;
19301        }
19302        Ok(__struct)
19303    }
19304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19305        let mut __tmp = BytesMut::new(bytes);
19306        #[allow(clippy::absurd_extreme_comparisons)]
19307        #[allow(unused_comparisons)]
19308        if __tmp.remaining() < Self::ENCODED_LEN {
19309            panic!(
19310                "buffer is too small (need {} bytes, but got {})",
19311                Self::ENCODED_LEN,
19312                __tmp.remaining(),
19313            )
19314        }
19315        __tmp.put_u32_le(self.ofs);
19316        __tmp.put_u16_le(self.id);
19317        __tmp.put_u8(self.count);
19318        for val in &self.data {
19319            __tmp.put_u8(*val);
19320        }
19321        if matches!(version, MavlinkVersion::V2) {
19322            let len = __tmp.len();
19323            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19324        } else {
19325            __tmp.len()
19326        }
19327    }
19328}
19329#[doc = "Reply to LOG_REQUEST_LIST."]
19330#[doc = ""]
19331#[doc = "ID: 118"]
19332#[derive(Debug, Clone, PartialEq)]
19333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19334#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19335#[cfg_attr(feature = "ts", derive(TS))]
19336#[cfg_attr(feature = "ts", ts(export))]
19337pub struct LOG_ENTRY_DATA {
19338    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
19339    pub time_utc: u32,
19340    #[doc = "Size of the log (may be approximate)"]
19341    pub size: u32,
19342    #[doc = "Log id"]
19343    pub id: u16,
19344    #[doc = "Total number of logs"]
19345    pub num_logs: u16,
19346    #[doc = "High log number"]
19347    pub last_log_num: u16,
19348}
19349impl LOG_ENTRY_DATA {
19350    pub const ENCODED_LEN: usize = 14usize;
19351    pub const DEFAULT: Self = Self {
19352        time_utc: 0_u32,
19353        size: 0_u32,
19354        id: 0_u16,
19355        num_logs: 0_u16,
19356        last_log_num: 0_u16,
19357    };
19358    #[cfg(feature = "arbitrary")]
19359    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19360        use arbitrary::{Arbitrary, Unstructured};
19361        let mut buf = [0u8; 1024];
19362        rng.fill_bytes(&mut buf);
19363        let mut unstructured = Unstructured::new(&buf);
19364        Self::arbitrary(&mut unstructured).unwrap_or_default()
19365    }
19366}
19367impl Default for LOG_ENTRY_DATA {
19368    fn default() -> Self {
19369        Self::DEFAULT.clone()
19370    }
19371}
19372impl MessageData for LOG_ENTRY_DATA {
19373    type Message = MavMessage;
19374    const ID: u32 = 118u32;
19375    const NAME: &'static str = "LOG_ENTRY";
19376    const EXTRA_CRC: u8 = 56u8;
19377    const ENCODED_LEN: usize = 14usize;
19378    fn deser(
19379        _version: MavlinkVersion,
19380        __input: &[u8],
19381    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19382        let avail_len = __input.len();
19383        let mut payload_buf = [0; Self::ENCODED_LEN];
19384        let mut buf = if avail_len < Self::ENCODED_LEN {
19385            payload_buf[0..avail_len].copy_from_slice(__input);
19386            Bytes::new(&payload_buf)
19387        } else {
19388            Bytes::new(__input)
19389        };
19390        let mut __struct = Self::default();
19391        __struct.time_utc = buf.get_u32_le()?;
19392        __struct.size = buf.get_u32_le()?;
19393        __struct.id = buf.get_u16_le()?;
19394        __struct.num_logs = buf.get_u16_le()?;
19395        __struct.last_log_num = buf.get_u16_le()?;
19396        Ok(__struct)
19397    }
19398    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19399        let mut __tmp = BytesMut::new(bytes);
19400        #[allow(clippy::absurd_extreme_comparisons)]
19401        #[allow(unused_comparisons)]
19402        if __tmp.remaining() < Self::ENCODED_LEN {
19403            panic!(
19404                "buffer is too small (need {} bytes, but got {})",
19405                Self::ENCODED_LEN,
19406                __tmp.remaining(),
19407            )
19408        }
19409        __tmp.put_u32_le(self.time_utc);
19410        __tmp.put_u32_le(self.size);
19411        __tmp.put_u16_le(self.id);
19412        __tmp.put_u16_le(self.num_logs);
19413        __tmp.put_u16_le(self.last_log_num);
19414        if matches!(version, MavlinkVersion::V2) {
19415            let len = __tmp.len();
19416            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19417        } else {
19418            __tmp.len()
19419        }
19420    }
19421}
19422#[doc = "Erase all logs."]
19423#[doc = ""]
19424#[doc = "ID: 121"]
19425#[derive(Debug, Clone, PartialEq)]
19426#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19428#[cfg_attr(feature = "ts", derive(TS))]
19429#[cfg_attr(feature = "ts", ts(export))]
19430pub struct LOG_ERASE_DATA {
19431    #[doc = "System ID"]
19432    pub target_system: u8,
19433    #[doc = "Component ID"]
19434    pub target_component: u8,
19435}
19436impl LOG_ERASE_DATA {
19437    pub const ENCODED_LEN: usize = 2usize;
19438    pub const DEFAULT: Self = Self {
19439        target_system: 0_u8,
19440        target_component: 0_u8,
19441    };
19442    #[cfg(feature = "arbitrary")]
19443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19444        use arbitrary::{Arbitrary, Unstructured};
19445        let mut buf = [0u8; 1024];
19446        rng.fill_bytes(&mut buf);
19447        let mut unstructured = Unstructured::new(&buf);
19448        Self::arbitrary(&mut unstructured).unwrap_or_default()
19449    }
19450}
19451impl Default for LOG_ERASE_DATA {
19452    fn default() -> Self {
19453        Self::DEFAULT.clone()
19454    }
19455}
19456impl MessageData for LOG_ERASE_DATA {
19457    type Message = MavMessage;
19458    const ID: u32 = 121u32;
19459    const NAME: &'static str = "LOG_ERASE";
19460    const EXTRA_CRC: u8 = 237u8;
19461    const ENCODED_LEN: usize = 2usize;
19462    fn deser(
19463        _version: MavlinkVersion,
19464        __input: &[u8],
19465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19466        let avail_len = __input.len();
19467        let mut payload_buf = [0; Self::ENCODED_LEN];
19468        let mut buf = if avail_len < Self::ENCODED_LEN {
19469            payload_buf[0..avail_len].copy_from_slice(__input);
19470            Bytes::new(&payload_buf)
19471        } else {
19472            Bytes::new(__input)
19473        };
19474        let mut __struct = Self::default();
19475        __struct.target_system = buf.get_u8()?;
19476        __struct.target_component = buf.get_u8()?;
19477        Ok(__struct)
19478    }
19479    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19480        let mut __tmp = BytesMut::new(bytes);
19481        #[allow(clippy::absurd_extreme_comparisons)]
19482        #[allow(unused_comparisons)]
19483        if __tmp.remaining() < Self::ENCODED_LEN {
19484            panic!(
19485                "buffer is too small (need {} bytes, but got {})",
19486                Self::ENCODED_LEN,
19487                __tmp.remaining(),
19488            )
19489        }
19490        __tmp.put_u8(self.target_system);
19491        __tmp.put_u8(self.target_component);
19492        if matches!(version, MavlinkVersion::V2) {
19493            let len = __tmp.len();
19494            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19495        } else {
19496            __tmp.len()
19497        }
19498    }
19499}
19500#[doc = "Request a chunk of a log."]
19501#[doc = ""]
19502#[doc = "ID: 119"]
19503#[derive(Debug, Clone, PartialEq)]
19504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19506#[cfg_attr(feature = "ts", derive(TS))]
19507#[cfg_attr(feature = "ts", ts(export))]
19508pub struct LOG_REQUEST_DATA_DATA {
19509    #[doc = "Offset into the log"]
19510    pub ofs: u32,
19511    #[doc = "Number of bytes"]
19512    pub count: u32,
19513    #[doc = "Log id (from LOG_ENTRY reply)"]
19514    pub id: u16,
19515    #[doc = "System ID"]
19516    pub target_system: u8,
19517    #[doc = "Component ID"]
19518    pub target_component: u8,
19519}
19520impl LOG_REQUEST_DATA_DATA {
19521    pub const ENCODED_LEN: usize = 12usize;
19522    pub const DEFAULT: Self = Self {
19523        ofs: 0_u32,
19524        count: 0_u32,
19525        id: 0_u16,
19526        target_system: 0_u8,
19527        target_component: 0_u8,
19528    };
19529    #[cfg(feature = "arbitrary")]
19530    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19531        use arbitrary::{Arbitrary, Unstructured};
19532        let mut buf = [0u8; 1024];
19533        rng.fill_bytes(&mut buf);
19534        let mut unstructured = Unstructured::new(&buf);
19535        Self::arbitrary(&mut unstructured).unwrap_or_default()
19536    }
19537}
19538impl Default for LOG_REQUEST_DATA_DATA {
19539    fn default() -> Self {
19540        Self::DEFAULT.clone()
19541    }
19542}
19543impl MessageData for LOG_REQUEST_DATA_DATA {
19544    type Message = MavMessage;
19545    const ID: u32 = 119u32;
19546    const NAME: &'static str = "LOG_REQUEST_DATA";
19547    const EXTRA_CRC: u8 = 116u8;
19548    const ENCODED_LEN: usize = 12usize;
19549    fn deser(
19550        _version: MavlinkVersion,
19551        __input: &[u8],
19552    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19553        let avail_len = __input.len();
19554        let mut payload_buf = [0; Self::ENCODED_LEN];
19555        let mut buf = if avail_len < Self::ENCODED_LEN {
19556            payload_buf[0..avail_len].copy_from_slice(__input);
19557            Bytes::new(&payload_buf)
19558        } else {
19559            Bytes::new(__input)
19560        };
19561        let mut __struct = Self::default();
19562        __struct.ofs = buf.get_u32_le()?;
19563        __struct.count = buf.get_u32_le()?;
19564        __struct.id = buf.get_u16_le()?;
19565        __struct.target_system = buf.get_u8()?;
19566        __struct.target_component = buf.get_u8()?;
19567        Ok(__struct)
19568    }
19569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19570        let mut __tmp = BytesMut::new(bytes);
19571        #[allow(clippy::absurd_extreme_comparisons)]
19572        #[allow(unused_comparisons)]
19573        if __tmp.remaining() < Self::ENCODED_LEN {
19574            panic!(
19575                "buffer is too small (need {} bytes, but got {})",
19576                Self::ENCODED_LEN,
19577                __tmp.remaining(),
19578            )
19579        }
19580        __tmp.put_u32_le(self.ofs);
19581        __tmp.put_u32_le(self.count);
19582        __tmp.put_u16_le(self.id);
19583        __tmp.put_u8(self.target_system);
19584        __tmp.put_u8(self.target_component);
19585        if matches!(version, MavlinkVersion::V2) {
19586            let len = __tmp.len();
19587            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19588        } else {
19589            __tmp.len()
19590        }
19591    }
19592}
19593#[doc = "Stop log transfer and resume normal logging."]
19594#[doc = ""]
19595#[doc = "ID: 122"]
19596#[derive(Debug, Clone, PartialEq)]
19597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19599#[cfg_attr(feature = "ts", derive(TS))]
19600#[cfg_attr(feature = "ts", ts(export))]
19601pub struct LOG_REQUEST_END_DATA {
19602    #[doc = "System ID"]
19603    pub target_system: u8,
19604    #[doc = "Component ID"]
19605    pub target_component: u8,
19606}
19607impl LOG_REQUEST_END_DATA {
19608    pub const ENCODED_LEN: usize = 2usize;
19609    pub const DEFAULT: Self = Self {
19610        target_system: 0_u8,
19611        target_component: 0_u8,
19612    };
19613    #[cfg(feature = "arbitrary")]
19614    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19615        use arbitrary::{Arbitrary, Unstructured};
19616        let mut buf = [0u8; 1024];
19617        rng.fill_bytes(&mut buf);
19618        let mut unstructured = Unstructured::new(&buf);
19619        Self::arbitrary(&mut unstructured).unwrap_or_default()
19620    }
19621}
19622impl Default for LOG_REQUEST_END_DATA {
19623    fn default() -> Self {
19624        Self::DEFAULT.clone()
19625    }
19626}
19627impl MessageData for LOG_REQUEST_END_DATA {
19628    type Message = MavMessage;
19629    const ID: u32 = 122u32;
19630    const NAME: &'static str = "LOG_REQUEST_END";
19631    const EXTRA_CRC: u8 = 203u8;
19632    const ENCODED_LEN: usize = 2usize;
19633    fn deser(
19634        _version: MavlinkVersion,
19635        __input: &[u8],
19636    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19637        let avail_len = __input.len();
19638        let mut payload_buf = [0; Self::ENCODED_LEN];
19639        let mut buf = if avail_len < Self::ENCODED_LEN {
19640            payload_buf[0..avail_len].copy_from_slice(__input);
19641            Bytes::new(&payload_buf)
19642        } else {
19643            Bytes::new(__input)
19644        };
19645        let mut __struct = Self::default();
19646        __struct.target_system = buf.get_u8()?;
19647        __struct.target_component = buf.get_u8()?;
19648        Ok(__struct)
19649    }
19650    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19651        let mut __tmp = BytesMut::new(bytes);
19652        #[allow(clippy::absurd_extreme_comparisons)]
19653        #[allow(unused_comparisons)]
19654        if __tmp.remaining() < Self::ENCODED_LEN {
19655            panic!(
19656                "buffer is too small (need {} bytes, but got {})",
19657                Self::ENCODED_LEN,
19658                __tmp.remaining(),
19659            )
19660        }
19661        __tmp.put_u8(self.target_system);
19662        __tmp.put_u8(self.target_component);
19663        if matches!(version, MavlinkVersion::V2) {
19664            let len = __tmp.len();
19665            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19666        } else {
19667            __tmp.len()
19668        }
19669    }
19670}
19671#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
19672#[doc = ""]
19673#[doc = "ID: 117"]
19674#[derive(Debug, Clone, PartialEq)]
19675#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19676#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19677#[cfg_attr(feature = "ts", derive(TS))]
19678#[cfg_attr(feature = "ts", ts(export))]
19679pub struct LOG_REQUEST_LIST_DATA {
19680    #[doc = "First log id (0 for first available)"]
19681    pub start: u16,
19682    #[doc = "Last log id (0xffff for last available)"]
19683    pub end: u16,
19684    #[doc = "System ID"]
19685    pub target_system: u8,
19686    #[doc = "Component ID"]
19687    pub target_component: u8,
19688}
19689impl LOG_REQUEST_LIST_DATA {
19690    pub const ENCODED_LEN: usize = 6usize;
19691    pub const DEFAULT: Self = Self {
19692        start: 0_u16,
19693        end: 0_u16,
19694        target_system: 0_u8,
19695        target_component: 0_u8,
19696    };
19697    #[cfg(feature = "arbitrary")]
19698    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19699        use arbitrary::{Arbitrary, Unstructured};
19700        let mut buf = [0u8; 1024];
19701        rng.fill_bytes(&mut buf);
19702        let mut unstructured = Unstructured::new(&buf);
19703        Self::arbitrary(&mut unstructured).unwrap_or_default()
19704    }
19705}
19706impl Default for LOG_REQUEST_LIST_DATA {
19707    fn default() -> Self {
19708        Self::DEFAULT.clone()
19709    }
19710}
19711impl MessageData for LOG_REQUEST_LIST_DATA {
19712    type Message = MavMessage;
19713    const ID: u32 = 117u32;
19714    const NAME: &'static str = "LOG_REQUEST_LIST";
19715    const EXTRA_CRC: u8 = 128u8;
19716    const ENCODED_LEN: usize = 6usize;
19717    fn deser(
19718        _version: MavlinkVersion,
19719        __input: &[u8],
19720    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19721        let avail_len = __input.len();
19722        let mut payload_buf = [0; Self::ENCODED_LEN];
19723        let mut buf = if avail_len < Self::ENCODED_LEN {
19724            payload_buf[0..avail_len].copy_from_slice(__input);
19725            Bytes::new(&payload_buf)
19726        } else {
19727            Bytes::new(__input)
19728        };
19729        let mut __struct = Self::default();
19730        __struct.start = buf.get_u16_le()?;
19731        __struct.end = buf.get_u16_le()?;
19732        __struct.target_system = buf.get_u8()?;
19733        __struct.target_component = buf.get_u8()?;
19734        Ok(__struct)
19735    }
19736    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19737        let mut __tmp = BytesMut::new(bytes);
19738        #[allow(clippy::absurd_extreme_comparisons)]
19739        #[allow(unused_comparisons)]
19740        if __tmp.remaining() < Self::ENCODED_LEN {
19741            panic!(
19742                "buffer is too small (need {} bytes, but got {})",
19743                Self::ENCODED_LEN,
19744                __tmp.remaining(),
19745            )
19746        }
19747        __tmp.put_u16_le(self.start);
19748        __tmp.put_u16_le(self.end);
19749        __tmp.put_u8(self.target_system);
19750        __tmp.put_u8(self.target_component);
19751        if matches!(version, MavlinkVersion::V2) {
19752            let len = __tmp.len();
19753            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19754        } else {
19755            __tmp.len()
19756        }
19757    }
19758}
19759#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
19760#[doc = ""]
19761#[doc = "ID: 192"]
19762#[derive(Debug, Clone, PartialEq)]
19763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19765#[cfg_attr(feature = "ts", derive(TS))]
19766#[cfg_attr(feature = "ts", ts(export))]
19767pub struct MAG_CAL_REPORT_DATA {
19768    #[doc = "RMS milligauss residuals."]
19769    pub fitness: f32,
19770    #[doc = "X offset."]
19771    pub ofs_x: f32,
19772    #[doc = "Y offset."]
19773    pub ofs_y: f32,
19774    #[doc = "Z offset."]
19775    pub ofs_z: f32,
19776    #[doc = "X diagonal (matrix 11)."]
19777    pub diag_x: f32,
19778    #[doc = "Y diagonal (matrix 22)."]
19779    pub diag_y: f32,
19780    #[doc = "Z diagonal (matrix 33)."]
19781    pub diag_z: f32,
19782    #[doc = "X off-diagonal (matrix 12 and 21)."]
19783    pub offdiag_x: f32,
19784    #[doc = "Y off-diagonal (matrix 13 and 31)."]
19785    pub offdiag_y: f32,
19786    #[doc = "Z off-diagonal (matrix 32 and 23)."]
19787    pub offdiag_z: f32,
19788    #[doc = "Compass being calibrated."]
19789    pub compass_id: u8,
19790    #[doc = "Bitmask of compasses being calibrated."]
19791    pub cal_mask: u8,
19792    #[doc = "Calibration Status."]
19793    pub cal_status: MagCalStatus,
19794    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
19795    pub autosaved: u8,
19796    #[doc = "Confidence in orientation (higher is better)."]
19797    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19798    pub orientation_confidence: f32,
19799    #[doc = "orientation before calibration."]
19800    #[cfg_attr(feature = "serde", serde(default))]
19801    pub old_orientation: MavSensorOrientation,
19802    #[doc = "orientation after calibration."]
19803    #[cfg_attr(feature = "serde", serde(default))]
19804    pub new_orientation: MavSensorOrientation,
19805    #[doc = "field radius correction factor"]
19806    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19807    pub scale_factor: f32,
19808}
19809impl MAG_CAL_REPORT_DATA {
19810    pub const ENCODED_LEN: usize = 54usize;
19811    pub const DEFAULT: Self = Self {
19812        fitness: 0.0_f32,
19813        ofs_x: 0.0_f32,
19814        ofs_y: 0.0_f32,
19815        ofs_z: 0.0_f32,
19816        diag_x: 0.0_f32,
19817        diag_y: 0.0_f32,
19818        diag_z: 0.0_f32,
19819        offdiag_x: 0.0_f32,
19820        offdiag_y: 0.0_f32,
19821        offdiag_z: 0.0_f32,
19822        compass_id: 0_u8,
19823        cal_mask: 0_u8,
19824        cal_status: MagCalStatus::DEFAULT,
19825        autosaved: 0_u8,
19826        orientation_confidence: 0.0_f32,
19827        old_orientation: MavSensorOrientation::DEFAULT,
19828        new_orientation: MavSensorOrientation::DEFAULT,
19829        scale_factor: 0.0_f32,
19830    };
19831    #[cfg(feature = "arbitrary")]
19832    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19833        use arbitrary::{Arbitrary, Unstructured};
19834        let mut buf = [0u8; 1024];
19835        rng.fill_bytes(&mut buf);
19836        let mut unstructured = Unstructured::new(&buf);
19837        Self::arbitrary(&mut unstructured).unwrap_or_default()
19838    }
19839}
19840impl Default for MAG_CAL_REPORT_DATA {
19841    fn default() -> Self {
19842        Self::DEFAULT.clone()
19843    }
19844}
19845impl MessageData for MAG_CAL_REPORT_DATA {
19846    type Message = MavMessage;
19847    const ID: u32 = 192u32;
19848    const NAME: &'static str = "MAG_CAL_REPORT";
19849    const EXTRA_CRC: u8 = 36u8;
19850    const ENCODED_LEN: usize = 54usize;
19851    fn deser(
19852        _version: MavlinkVersion,
19853        __input: &[u8],
19854    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19855        let avail_len = __input.len();
19856        let mut payload_buf = [0; Self::ENCODED_LEN];
19857        let mut buf = if avail_len < Self::ENCODED_LEN {
19858            payload_buf[0..avail_len].copy_from_slice(__input);
19859            Bytes::new(&payload_buf)
19860        } else {
19861            Bytes::new(__input)
19862        };
19863        let mut __struct = Self::default();
19864        __struct.fitness = buf.get_f32_le()?;
19865        __struct.ofs_x = buf.get_f32_le()?;
19866        __struct.ofs_y = buf.get_f32_le()?;
19867        __struct.ofs_z = buf.get_f32_le()?;
19868        __struct.diag_x = buf.get_f32_le()?;
19869        __struct.diag_y = buf.get_f32_le()?;
19870        __struct.diag_z = buf.get_f32_le()?;
19871        __struct.offdiag_x = buf.get_f32_le()?;
19872        __struct.offdiag_y = buf.get_f32_le()?;
19873        __struct.offdiag_z = buf.get_f32_le()?;
19874        __struct.compass_id = buf.get_u8()?;
19875        __struct.cal_mask = buf.get_u8()?;
19876        let tmp = buf.get_u8()?;
19877        __struct.cal_status =
19878            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19879                enum_type: "MagCalStatus",
19880                value: tmp as u64,
19881            })?;
19882        __struct.autosaved = buf.get_u8()?;
19883        __struct.orientation_confidence = buf.get_f32_le()?;
19884        let tmp = buf.get_u8()?;
19885        __struct.old_orientation =
19886            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19887                enum_type: "MavSensorOrientation",
19888                value: tmp as u64,
19889            })?;
19890        let tmp = buf.get_u8()?;
19891        __struct.new_orientation =
19892            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19893                enum_type: "MavSensorOrientation",
19894                value: tmp as u64,
19895            })?;
19896        __struct.scale_factor = buf.get_f32_le()?;
19897        Ok(__struct)
19898    }
19899    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19900        let mut __tmp = BytesMut::new(bytes);
19901        #[allow(clippy::absurd_extreme_comparisons)]
19902        #[allow(unused_comparisons)]
19903        if __tmp.remaining() < Self::ENCODED_LEN {
19904            panic!(
19905                "buffer is too small (need {} bytes, but got {})",
19906                Self::ENCODED_LEN,
19907                __tmp.remaining(),
19908            )
19909        }
19910        __tmp.put_f32_le(self.fitness);
19911        __tmp.put_f32_le(self.ofs_x);
19912        __tmp.put_f32_le(self.ofs_y);
19913        __tmp.put_f32_le(self.ofs_z);
19914        __tmp.put_f32_le(self.diag_x);
19915        __tmp.put_f32_le(self.diag_y);
19916        __tmp.put_f32_le(self.diag_z);
19917        __tmp.put_f32_le(self.offdiag_x);
19918        __tmp.put_f32_le(self.offdiag_y);
19919        __tmp.put_f32_le(self.offdiag_z);
19920        __tmp.put_u8(self.compass_id);
19921        __tmp.put_u8(self.cal_mask);
19922        __tmp.put_u8(self.cal_status as u8);
19923        __tmp.put_u8(self.autosaved);
19924        if matches!(version, MavlinkVersion::V2) {
19925            __tmp.put_f32_le(self.orientation_confidence);
19926            __tmp.put_u8(self.old_orientation as u8);
19927            __tmp.put_u8(self.new_orientation as u8);
19928            __tmp.put_f32_le(self.scale_factor);
19929            let len = __tmp.len();
19930            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19931        } else {
19932            __tmp.len()
19933        }
19934    }
19935}
19936#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19937#[doc = ""]
19938#[doc = "ID: 69"]
19939#[derive(Debug, Clone, PartialEq)]
19940#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19941#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19942#[cfg_attr(feature = "ts", derive(TS))]
19943#[cfg_attr(feature = "ts", ts(export))]
19944pub struct MANUAL_CONTROL_DATA {
19945    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19946    pub x: i16,
19947    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19948    pub y: i16,
19949    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19950    pub z: i16,
19951    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19952    pub r: i16,
19953    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19954    pub buttons: u16,
19955    #[doc = "The system to be controlled."]
19956    pub target: u8,
19957    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19958    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19959    pub buttons2: u16,
19960    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19961    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19962    pub enabled_extensions: u8,
19963    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19964    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19965    pub s: i16,
19966    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19967    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19968    pub t: i16,
19969    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19970    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19971    pub aux1: i16,
19972    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19973    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19974    pub aux2: i16,
19975    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19976    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19977    pub aux3: i16,
19978    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19979    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19980    pub aux4: i16,
19981    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19982    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19983    pub aux5: i16,
19984    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19985    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19986    pub aux6: i16,
19987}
19988impl MANUAL_CONTROL_DATA {
19989    pub const ENCODED_LEN: usize = 30usize;
19990    pub const DEFAULT: Self = Self {
19991        x: 0_i16,
19992        y: 0_i16,
19993        z: 0_i16,
19994        r: 0_i16,
19995        buttons: 0_u16,
19996        target: 0_u8,
19997        buttons2: 0_u16,
19998        enabled_extensions: 0_u8,
19999        s: 0_i16,
20000        t: 0_i16,
20001        aux1: 0_i16,
20002        aux2: 0_i16,
20003        aux3: 0_i16,
20004        aux4: 0_i16,
20005        aux5: 0_i16,
20006        aux6: 0_i16,
20007    };
20008    #[cfg(feature = "arbitrary")]
20009    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20010        use arbitrary::{Arbitrary, Unstructured};
20011        let mut buf = [0u8; 1024];
20012        rng.fill_bytes(&mut buf);
20013        let mut unstructured = Unstructured::new(&buf);
20014        Self::arbitrary(&mut unstructured).unwrap_or_default()
20015    }
20016}
20017impl Default for MANUAL_CONTROL_DATA {
20018    fn default() -> Self {
20019        Self::DEFAULT.clone()
20020    }
20021}
20022impl MessageData for MANUAL_CONTROL_DATA {
20023    type Message = MavMessage;
20024    const ID: u32 = 69u32;
20025    const NAME: &'static str = "MANUAL_CONTROL";
20026    const EXTRA_CRC: u8 = 243u8;
20027    const ENCODED_LEN: usize = 30usize;
20028    fn deser(
20029        _version: MavlinkVersion,
20030        __input: &[u8],
20031    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20032        let avail_len = __input.len();
20033        let mut payload_buf = [0; Self::ENCODED_LEN];
20034        let mut buf = if avail_len < Self::ENCODED_LEN {
20035            payload_buf[0..avail_len].copy_from_slice(__input);
20036            Bytes::new(&payload_buf)
20037        } else {
20038            Bytes::new(__input)
20039        };
20040        let mut __struct = Self::default();
20041        __struct.x = buf.get_i16_le()?;
20042        __struct.y = buf.get_i16_le()?;
20043        __struct.z = buf.get_i16_le()?;
20044        __struct.r = buf.get_i16_le()?;
20045        __struct.buttons = buf.get_u16_le()?;
20046        __struct.target = buf.get_u8()?;
20047        __struct.buttons2 = buf.get_u16_le()?;
20048        __struct.enabled_extensions = buf.get_u8()?;
20049        __struct.s = buf.get_i16_le()?;
20050        __struct.t = buf.get_i16_le()?;
20051        __struct.aux1 = buf.get_i16_le()?;
20052        __struct.aux2 = buf.get_i16_le()?;
20053        __struct.aux3 = buf.get_i16_le()?;
20054        __struct.aux4 = buf.get_i16_le()?;
20055        __struct.aux5 = buf.get_i16_le()?;
20056        __struct.aux6 = buf.get_i16_le()?;
20057        Ok(__struct)
20058    }
20059    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20060        let mut __tmp = BytesMut::new(bytes);
20061        #[allow(clippy::absurd_extreme_comparisons)]
20062        #[allow(unused_comparisons)]
20063        if __tmp.remaining() < Self::ENCODED_LEN {
20064            panic!(
20065                "buffer is too small (need {} bytes, but got {})",
20066                Self::ENCODED_LEN,
20067                __tmp.remaining(),
20068            )
20069        }
20070        __tmp.put_i16_le(self.x);
20071        __tmp.put_i16_le(self.y);
20072        __tmp.put_i16_le(self.z);
20073        __tmp.put_i16_le(self.r);
20074        __tmp.put_u16_le(self.buttons);
20075        __tmp.put_u8(self.target);
20076        if matches!(version, MavlinkVersion::V2) {
20077            __tmp.put_u16_le(self.buttons2);
20078            __tmp.put_u8(self.enabled_extensions);
20079            __tmp.put_i16_le(self.s);
20080            __tmp.put_i16_le(self.t);
20081            __tmp.put_i16_le(self.aux1);
20082            __tmp.put_i16_le(self.aux2);
20083            __tmp.put_i16_le(self.aux3);
20084            __tmp.put_i16_le(self.aux4);
20085            __tmp.put_i16_le(self.aux5);
20086            __tmp.put_i16_le(self.aux6);
20087            let len = __tmp.len();
20088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20089        } else {
20090            __tmp.len()
20091        }
20092    }
20093}
20094#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
20095#[doc = ""]
20096#[doc = "ID: 81"]
20097#[derive(Debug, Clone, PartialEq)]
20098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20100#[cfg_attr(feature = "ts", derive(TS))]
20101#[cfg_attr(feature = "ts", ts(export))]
20102pub struct MANUAL_SETPOINT_DATA {
20103    #[doc = "Timestamp (time since system boot)."]
20104    pub time_boot_ms: u32,
20105    #[doc = "Desired roll rate"]
20106    pub roll: f32,
20107    #[doc = "Desired pitch rate"]
20108    pub pitch: f32,
20109    #[doc = "Desired yaw rate"]
20110    pub yaw: f32,
20111    #[doc = "Collective thrust, normalized to 0 .. 1"]
20112    pub thrust: f32,
20113    #[doc = "Flight mode switch position, 0.. 255"]
20114    pub mode_switch: u8,
20115    #[doc = "Override mode switch position, 0.. 255"]
20116    pub manual_override_switch: u8,
20117}
20118impl MANUAL_SETPOINT_DATA {
20119    pub const ENCODED_LEN: usize = 22usize;
20120    pub const DEFAULT: Self = Self {
20121        time_boot_ms: 0_u32,
20122        roll: 0.0_f32,
20123        pitch: 0.0_f32,
20124        yaw: 0.0_f32,
20125        thrust: 0.0_f32,
20126        mode_switch: 0_u8,
20127        manual_override_switch: 0_u8,
20128    };
20129    #[cfg(feature = "arbitrary")]
20130    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20131        use arbitrary::{Arbitrary, Unstructured};
20132        let mut buf = [0u8; 1024];
20133        rng.fill_bytes(&mut buf);
20134        let mut unstructured = Unstructured::new(&buf);
20135        Self::arbitrary(&mut unstructured).unwrap_or_default()
20136    }
20137}
20138impl Default for MANUAL_SETPOINT_DATA {
20139    fn default() -> Self {
20140        Self::DEFAULT.clone()
20141    }
20142}
20143impl MessageData for MANUAL_SETPOINT_DATA {
20144    type Message = MavMessage;
20145    const ID: u32 = 81u32;
20146    const NAME: &'static str = "MANUAL_SETPOINT";
20147    const EXTRA_CRC: u8 = 106u8;
20148    const ENCODED_LEN: usize = 22usize;
20149    fn deser(
20150        _version: MavlinkVersion,
20151        __input: &[u8],
20152    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20153        let avail_len = __input.len();
20154        let mut payload_buf = [0; Self::ENCODED_LEN];
20155        let mut buf = if avail_len < Self::ENCODED_LEN {
20156            payload_buf[0..avail_len].copy_from_slice(__input);
20157            Bytes::new(&payload_buf)
20158        } else {
20159            Bytes::new(__input)
20160        };
20161        let mut __struct = Self::default();
20162        __struct.time_boot_ms = buf.get_u32_le()?;
20163        __struct.roll = buf.get_f32_le()?;
20164        __struct.pitch = buf.get_f32_le()?;
20165        __struct.yaw = buf.get_f32_le()?;
20166        __struct.thrust = buf.get_f32_le()?;
20167        __struct.mode_switch = buf.get_u8()?;
20168        __struct.manual_override_switch = buf.get_u8()?;
20169        Ok(__struct)
20170    }
20171    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20172        let mut __tmp = BytesMut::new(bytes);
20173        #[allow(clippy::absurd_extreme_comparisons)]
20174        #[allow(unused_comparisons)]
20175        if __tmp.remaining() < Self::ENCODED_LEN {
20176            panic!(
20177                "buffer is too small (need {} bytes, but got {})",
20178                Self::ENCODED_LEN,
20179                __tmp.remaining(),
20180            )
20181        }
20182        __tmp.put_u32_le(self.time_boot_ms);
20183        __tmp.put_f32_le(self.roll);
20184        __tmp.put_f32_le(self.pitch);
20185        __tmp.put_f32_le(self.yaw);
20186        __tmp.put_f32_le(self.thrust);
20187        __tmp.put_u8(self.mode_switch);
20188        __tmp.put_u8(self.manual_override_switch);
20189        if matches!(version, MavlinkVersion::V2) {
20190            let len = __tmp.len();
20191            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20192        } else {
20193            __tmp.len()
20194        }
20195    }
20196}
20197#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20198#[doc = ""]
20199#[doc = "ID: 249"]
20200#[derive(Debug, Clone, PartialEq)]
20201#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20202#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20203#[cfg_attr(feature = "ts", derive(TS))]
20204#[cfg_attr(feature = "ts", ts(export))]
20205pub struct MEMORY_VECT_DATA {
20206    #[doc = "Starting address of the debug variables"]
20207    pub address: u16,
20208    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
20209    pub ver: u8,
20210    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
20211    pub mavtype: u8,
20212    #[doc = "Memory contents at specified address"]
20213    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20214    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20215    pub value: [i8; 32],
20216}
20217impl MEMORY_VECT_DATA {
20218    pub const ENCODED_LEN: usize = 36usize;
20219    pub const DEFAULT: Self = Self {
20220        address: 0_u16,
20221        ver: 0_u8,
20222        mavtype: 0_u8,
20223        value: [0_i8; 32usize],
20224    };
20225    #[cfg(feature = "arbitrary")]
20226    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20227        use arbitrary::{Arbitrary, Unstructured};
20228        let mut buf = [0u8; 1024];
20229        rng.fill_bytes(&mut buf);
20230        let mut unstructured = Unstructured::new(&buf);
20231        Self::arbitrary(&mut unstructured).unwrap_or_default()
20232    }
20233}
20234impl Default for MEMORY_VECT_DATA {
20235    fn default() -> Self {
20236        Self::DEFAULT.clone()
20237    }
20238}
20239impl MessageData for MEMORY_VECT_DATA {
20240    type Message = MavMessage;
20241    const ID: u32 = 249u32;
20242    const NAME: &'static str = "MEMORY_VECT";
20243    const EXTRA_CRC: u8 = 204u8;
20244    const ENCODED_LEN: usize = 36usize;
20245    fn deser(
20246        _version: MavlinkVersion,
20247        __input: &[u8],
20248    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20249        let avail_len = __input.len();
20250        let mut payload_buf = [0; Self::ENCODED_LEN];
20251        let mut buf = if avail_len < Self::ENCODED_LEN {
20252            payload_buf[0..avail_len].copy_from_slice(__input);
20253            Bytes::new(&payload_buf)
20254        } else {
20255            Bytes::new(__input)
20256        };
20257        let mut __struct = Self::default();
20258        __struct.address = buf.get_u16_le()?;
20259        __struct.ver = buf.get_u8()?;
20260        __struct.mavtype = buf.get_u8()?;
20261        for v in &mut __struct.value {
20262            let val = buf.get_i8()?;
20263            *v = val;
20264        }
20265        Ok(__struct)
20266    }
20267    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20268        let mut __tmp = BytesMut::new(bytes);
20269        #[allow(clippy::absurd_extreme_comparisons)]
20270        #[allow(unused_comparisons)]
20271        if __tmp.remaining() < Self::ENCODED_LEN {
20272            panic!(
20273                "buffer is too small (need {} bytes, but got {})",
20274                Self::ENCODED_LEN,
20275                __tmp.remaining(),
20276            )
20277        }
20278        __tmp.put_u16_le(self.address);
20279        __tmp.put_u8(self.ver);
20280        __tmp.put_u8(self.mavtype);
20281        for val in &self.value {
20282            __tmp.put_i8(*val);
20283        }
20284        if matches!(version, MavlinkVersion::V2) {
20285            let len = __tmp.len();
20286            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20287        } else {
20288            __tmp.len()
20289        }
20290    }
20291}
20292#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
20293#[doc = ""]
20294#[doc = "ID: 244"]
20295#[derive(Debug, Clone, PartialEq)]
20296#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20297#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20298#[cfg_attr(feature = "ts", derive(TS))]
20299#[cfg_attr(feature = "ts", ts(export))]
20300pub struct MESSAGE_INTERVAL_DATA {
20301    #[doc = "0 indicates the interval at which it is sent."]
20302    pub interval_us: i32,
20303    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
20304    pub message_id: u16,
20305}
20306impl MESSAGE_INTERVAL_DATA {
20307    pub const ENCODED_LEN: usize = 6usize;
20308    pub const DEFAULT: Self = Self {
20309        interval_us: 0_i32,
20310        message_id: 0_u16,
20311    };
20312    #[cfg(feature = "arbitrary")]
20313    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20314        use arbitrary::{Arbitrary, Unstructured};
20315        let mut buf = [0u8; 1024];
20316        rng.fill_bytes(&mut buf);
20317        let mut unstructured = Unstructured::new(&buf);
20318        Self::arbitrary(&mut unstructured).unwrap_or_default()
20319    }
20320}
20321impl Default for MESSAGE_INTERVAL_DATA {
20322    fn default() -> Self {
20323        Self::DEFAULT.clone()
20324    }
20325}
20326impl MessageData for MESSAGE_INTERVAL_DATA {
20327    type Message = MavMessage;
20328    const ID: u32 = 244u32;
20329    const NAME: &'static str = "MESSAGE_INTERVAL";
20330    const EXTRA_CRC: u8 = 95u8;
20331    const ENCODED_LEN: usize = 6usize;
20332    fn deser(
20333        _version: MavlinkVersion,
20334        __input: &[u8],
20335    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20336        let avail_len = __input.len();
20337        let mut payload_buf = [0; Self::ENCODED_LEN];
20338        let mut buf = if avail_len < Self::ENCODED_LEN {
20339            payload_buf[0..avail_len].copy_from_slice(__input);
20340            Bytes::new(&payload_buf)
20341        } else {
20342            Bytes::new(__input)
20343        };
20344        let mut __struct = Self::default();
20345        __struct.interval_us = buf.get_i32_le()?;
20346        __struct.message_id = buf.get_u16_le()?;
20347        Ok(__struct)
20348    }
20349    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20350        let mut __tmp = BytesMut::new(bytes);
20351        #[allow(clippy::absurd_extreme_comparisons)]
20352        #[allow(unused_comparisons)]
20353        if __tmp.remaining() < Self::ENCODED_LEN {
20354            panic!(
20355                "buffer is too small (need {} bytes, but got {})",
20356                Self::ENCODED_LEN,
20357                __tmp.remaining(),
20358            )
20359        }
20360        __tmp.put_i32_le(self.interval_us);
20361        __tmp.put_u16_le(self.message_id);
20362        if matches!(version, MavlinkVersion::V2) {
20363            let len = __tmp.len();
20364            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20365        } else {
20366            __tmp.len()
20367        }
20368    }
20369}
20370#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
20371#[doc = ""]
20372#[doc = "ID: 47"]
20373#[derive(Debug, Clone, PartialEq)]
20374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20376#[cfg_attr(feature = "ts", derive(TS))]
20377#[cfg_attr(feature = "ts", ts(export))]
20378pub struct MISSION_ACK_DATA {
20379    #[doc = "System ID"]
20380    pub target_system: u8,
20381    #[doc = "Component ID"]
20382    pub target_component: u8,
20383    #[doc = "Mission result."]
20384    pub mavtype: MavMissionResult,
20385    #[doc = "Mission type."]
20386    #[cfg_attr(feature = "serde", serde(default))]
20387    pub mission_type: MavMissionType,
20388    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
20389    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20390    pub opaque_id: u32,
20391}
20392impl MISSION_ACK_DATA {
20393    pub const ENCODED_LEN: usize = 8usize;
20394    pub const DEFAULT: Self = Self {
20395        target_system: 0_u8,
20396        target_component: 0_u8,
20397        mavtype: MavMissionResult::DEFAULT,
20398        mission_type: MavMissionType::DEFAULT,
20399        opaque_id: 0_u32,
20400    };
20401    #[cfg(feature = "arbitrary")]
20402    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20403        use arbitrary::{Arbitrary, Unstructured};
20404        let mut buf = [0u8; 1024];
20405        rng.fill_bytes(&mut buf);
20406        let mut unstructured = Unstructured::new(&buf);
20407        Self::arbitrary(&mut unstructured).unwrap_or_default()
20408    }
20409}
20410impl Default for MISSION_ACK_DATA {
20411    fn default() -> Self {
20412        Self::DEFAULT.clone()
20413    }
20414}
20415impl MessageData for MISSION_ACK_DATA {
20416    type Message = MavMessage;
20417    const ID: u32 = 47u32;
20418    const NAME: &'static str = "MISSION_ACK";
20419    const EXTRA_CRC: u8 = 153u8;
20420    const ENCODED_LEN: usize = 8usize;
20421    fn deser(
20422        _version: MavlinkVersion,
20423        __input: &[u8],
20424    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20425        let avail_len = __input.len();
20426        let mut payload_buf = [0; Self::ENCODED_LEN];
20427        let mut buf = if avail_len < Self::ENCODED_LEN {
20428            payload_buf[0..avail_len].copy_from_slice(__input);
20429            Bytes::new(&payload_buf)
20430        } else {
20431            Bytes::new(__input)
20432        };
20433        let mut __struct = Self::default();
20434        __struct.target_system = buf.get_u8()?;
20435        __struct.target_component = buf.get_u8()?;
20436        let tmp = buf.get_u8()?;
20437        __struct.mavtype =
20438            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20439                enum_type: "MavMissionResult",
20440                value: tmp as u64,
20441            })?;
20442        let tmp = buf.get_u8()?;
20443        __struct.mission_type =
20444            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20445                enum_type: "MavMissionType",
20446                value: tmp as u64,
20447            })?;
20448        __struct.opaque_id = buf.get_u32_le()?;
20449        Ok(__struct)
20450    }
20451    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20452        let mut __tmp = BytesMut::new(bytes);
20453        #[allow(clippy::absurd_extreme_comparisons)]
20454        #[allow(unused_comparisons)]
20455        if __tmp.remaining() < Self::ENCODED_LEN {
20456            panic!(
20457                "buffer is too small (need {} bytes, but got {})",
20458                Self::ENCODED_LEN,
20459                __tmp.remaining(),
20460            )
20461        }
20462        __tmp.put_u8(self.target_system);
20463        __tmp.put_u8(self.target_component);
20464        __tmp.put_u8(self.mavtype as u8);
20465        if matches!(version, MavlinkVersion::V2) {
20466            __tmp.put_u8(self.mission_type as u8);
20467            __tmp.put_u32_le(self.opaque_id);
20468            let len = __tmp.len();
20469            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20470        } else {
20471            __tmp.len()
20472        }
20473    }
20474}
20475#[doc = "Delete all mission items at once."]
20476#[doc = ""]
20477#[doc = "ID: 45"]
20478#[derive(Debug, Clone, PartialEq)]
20479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20481#[cfg_attr(feature = "ts", derive(TS))]
20482#[cfg_attr(feature = "ts", ts(export))]
20483pub struct MISSION_CLEAR_ALL_DATA {
20484    #[doc = "System ID"]
20485    pub target_system: u8,
20486    #[doc = "Component ID"]
20487    pub target_component: u8,
20488    #[doc = "Mission type."]
20489    #[cfg_attr(feature = "serde", serde(default))]
20490    pub mission_type: MavMissionType,
20491}
20492impl MISSION_CLEAR_ALL_DATA {
20493    pub const ENCODED_LEN: usize = 3usize;
20494    pub const DEFAULT: Self = Self {
20495        target_system: 0_u8,
20496        target_component: 0_u8,
20497        mission_type: MavMissionType::DEFAULT,
20498    };
20499    #[cfg(feature = "arbitrary")]
20500    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20501        use arbitrary::{Arbitrary, Unstructured};
20502        let mut buf = [0u8; 1024];
20503        rng.fill_bytes(&mut buf);
20504        let mut unstructured = Unstructured::new(&buf);
20505        Self::arbitrary(&mut unstructured).unwrap_or_default()
20506    }
20507}
20508impl Default for MISSION_CLEAR_ALL_DATA {
20509    fn default() -> Self {
20510        Self::DEFAULT.clone()
20511    }
20512}
20513impl MessageData for MISSION_CLEAR_ALL_DATA {
20514    type Message = MavMessage;
20515    const ID: u32 = 45u32;
20516    const NAME: &'static str = "MISSION_CLEAR_ALL";
20517    const EXTRA_CRC: u8 = 232u8;
20518    const ENCODED_LEN: usize = 3usize;
20519    fn deser(
20520        _version: MavlinkVersion,
20521        __input: &[u8],
20522    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20523        let avail_len = __input.len();
20524        let mut payload_buf = [0; Self::ENCODED_LEN];
20525        let mut buf = if avail_len < Self::ENCODED_LEN {
20526            payload_buf[0..avail_len].copy_from_slice(__input);
20527            Bytes::new(&payload_buf)
20528        } else {
20529            Bytes::new(__input)
20530        };
20531        let mut __struct = Self::default();
20532        __struct.target_system = buf.get_u8()?;
20533        __struct.target_component = buf.get_u8()?;
20534        let tmp = buf.get_u8()?;
20535        __struct.mission_type =
20536            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20537                enum_type: "MavMissionType",
20538                value: tmp as u64,
20539            })?;
20540        Ok(__struct)
20541    }
20542    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20543        let mut __tmp = BytesMut::new(bytes);
20544        #[allow(clippy::absurd_extreme_comparisons)]
20545        #[allow(unused_comparisons)]
20546        if __tmp.remaining() < Self::ENCODED_LEN {
20547            panic!(
20548                "buffer is too small (need {} bytes, but got {})",
20549                Self::ENCODED_LEN,
20550                __tmp.remaining(),
20551            )
20552        }
20553        __tmp.put_u8(self.target_system);
20554        __tmp.put_u8(self.target_component);
20555        if matches!(version, MavlinkVersion::V2) {
20556            __tmp.put_u8(self.mission_type as u8);
20557            let len = __tmp.len();
20558            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20559        } else {
20560            __tmp.len()
20561        }
20562    }
20563}
20564#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
20565#[doc = ""]
20566#[doc = "ID: 44"]
20567#[derive(Debug, Clone, PartialEq)]
20568#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20569#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20570#[cfg_attr(feature = "ts", derive(TS))]
20571#[cfg_attr(feature = "ts", ts(export))]
20572pub struct MISSION_COUNT_DATA {
20573    #[doc = "Number of mission items in the sequence"]
20574    pub count: u16,
20575    #[doc = "System ID"]
20576    pub target_system: u8,
20577    #[doc = "Component ID"]
20578    pub target_component: u8,
20579    #[doc = "Mission type."]
20580    #[cfg_attr(feature = "serde", serde(default))]
20581    pub mission_type: MavMissionType,
20582    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
20583    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20584    pub opaque_id: u32,
20585}
20586impl MISSION_COUNT_DATA {
20587    pub const ENCODED_LEN: usize = 9usize;
20588    pub const DEFAULT: Self = Self {
20589        count: 0_u16,
20590        target_system: 0_u8,
20591        target_component: 0_u8,
20592        mission_type: MavMissionType::DEFAULT,
20593        opaque_id: 0_u32,
20594    };
20595    #[cfg(feature = "arbitrary")]
20596    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20597        use arbitrary::{Arbitrary, Unstructured};
20598        let mut buf = [0u8; 1024];
20599        rng.fill_bytes(&mut buf);
20600        let mut unstructured = Unstructured::new(&buf);
20601        Self::arbitrary(&mut unstructured).unwrap_or_default()
20602    }
20603}
20604impl Default for MISSION_COUNT_DATA {
20605    fn default() -> Self {
20606        Self::DEFAULT.clone()
20607    }
20608}
20609impl MessageData for MISSION_COUNT_DATA {
20610    type Message = MavMessage;
20611    const ID: u32 = 44u32;
20612    const NAME: &'static str = "MISSION_COUNT";
20613    const EXTRA_CRC: u8 = 221u8;
20614    const ENCODED_LEN: usize = 9usize;
20615    fn deser(
20616        _version: MavlinkVersion,
20617        __input: &[u8],
20618    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20619        let avail_len = __input.len();
20620        let mut payload_buf = [0; Self::ENCODED_LEN];
20621        let mut buf = if avail_len < Self::ENCODED_LEN {
20622            payload_buf[0..avail_len].copy_from_slice(__input);
20623            Bytes::new(&payload_buf)
20624        } else {
20625            Bytes::new(__input)
20626        };
20627        let mut __struct = Self::default();
20628        __struct.count = buf.get_u16_le()?;
20629        __struct.target_system = buf.get_u8()?;
20630        __struct.target_component = buf.get_u8()?;
20631        let tmp = buf.get_u8()?;
20632        __struct.mission_type =
20633            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20634                enum_type: "MavMissionType",
20635                value: tmp as u64,
20636            })?;
20637        __struct.opaque_id = buf.get_u32_le()?;
20638        Ok(__struct)
20639    }
20640    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20641        let mut __tmp = BytesMut::new(bytes);
20642        #[allow(clippy::absurd_extreme_comparisons)]
20643        #[allow(unused_comparisons)]
20644        if __tmp.remaining() < Self::ENCODED_LEN {
20645            panic!(
20646                "buffer is too small (need {} bytes, but got {})",
20647                Self::ENCODED_LEN,
20648                __tmp.remaining(),
20649            )
20650        }
20651        __tmp.put_u16_le(self.count);
20652        __tmp.put_u8(self.target_system);
20653        __tmp.put_u8(self.target_component);
20654        if matches!(version, MavlinkVersion::V2) {
20655            __tmp.put_u8(self.mission_type as u8);
20656            __tmp.put_u32_le(self.opaque_id);
20657            let len = __tmp.len();
20658            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20659        } else {
20660            __tmp.len()
20661        }
20662    }
20663}
20664#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
20665#[doc = ""]
20666#[doc = "ID: 42"]
20667#[derive(Debug, Clone, PartialEq)]
20668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20670#[cfg_attr(feature = "ts", derive(TS))]
20671#[cfg_attr(feature = "ts", ts(export))]
20672pub struct MISSION_CURRENT_DATA {
20673    #[doc = "Sequence"]
20674    pub seq: u16,
20675    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
20676    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20677    pub total: u16,
20678    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
20679    #[cfg_attr(feature = "serde", serde(default))]
20680    pub mission_state: MissionState,
20681    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
20682    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20683    pub mission_mode: u8,
20684    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
20685    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20686    pub mission_id: u32,
20687    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
20688    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20689    pub fence_id: u32,
20690    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
20691    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20692    pub rally_points_id: u32,
20693}
20694impl MISSION_CURRENT_DATA {
20695    pub const ENCODED_LEN: usize = 18usize;
20696    pub const DEFAULT: Self = Self {
20697        seq: 0_u16,
20698        total: 0_u16,
20699        mission_state: MissionState::DEFAULT,
20700        mission_mode: 0_u8,
20701        mission_id: 0_u32,
20702        fence_id: 0_u32,
20703        rally_points_id: 0_u32,
20704    };
20705    #[cfg(feature = "arbitrary")]
20706    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20707        use arbitrary::{Arbitrary, Unstructured};
20708        let mut buf = [0u8; 1024];
20709        rng.fill_bytes(&mut buf);
20710        let mut unstructured = Unstructured::new(&buf);
20711        Self::arbitrary(&mut unstructured).unwrap_or_default()
20712    }
20713}
20714impl Default for MISSION_CURRENT_DATA {
20715    fn default() -> Self {
20716        Self::DEFAULT.clone()
20717    }
20718}
20719impl MessageData for MISSION_CURRENT_DATA {
20720    type Message = MavMessage;
20721    const ID: u32 = 42u32;
20722    const NAME: &'static str = "MISSION_CURRENT";
20723    const EXTRA_CRC: u8 = 28u8;
20724    const ENCODED_LEN: usize = 18usize;
20725    fn deser(
20726        _version: MavlinkVersion,
20727        __input: &[u8],
20728    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20729        let avail_len = __input.len();
20730        let mut payload_buf = [0; Self::ENCODED_LEN];
20731        let mut buf = if avail_len < Self::ENCODED_LEN {
20732            payload_buf[0..avail_len].copy_from_slice(__input);
20733            Bytes::new(&payload_buf)
20734        } else {
20735            Bytes::new(__input)
20736        };
20737        let mut __struct = Self::default();
20738        __struct.seq = buf.get_u16_le()?;
20739        __struct.total = buf.get_u16_le()?;
20740        let tmp = buf.get_u8()?;
20741        __struct.mission_state =
20742            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20743                enum_type: "MissionState",
20744                value: tmp as u64,
20745            })?;
20746        __struct.mission_mode = buf.get_u8()?;
20747        __struct.mission_id = buf.get_u32_le()?;
20748        __struct.fence_id = buf.get_u32_le()?;
20749        __struct.rally_points_id = buf.get_u32_le()?;
20750        Ok(__struct)
20751    }
20752    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20753        let mut __tmp = BytesMut::new(bytes);
20754        #[allow(clippy::absurd_extreme_comparisons)]
20755        #[allow(unused_comparisons)]
20756        if __tmp.remaining() < Self::ENCODED_LEN {
20757            panic!(
20758                "buffer is too small (need {} bytes, but got {})",
20759                Self::ENCODED_LEN,
20760                __tmp.remaining(),
20761            )
20762        }
20763        __tmp.put_u16_le(self.seq);
20764        if matches!(version, MavlinkVersion::V2) {
20765            __tmp.put_u16_le(self.total);
20766            __tmp.put_u8(self.mission_state as u8);
20767            __tmp.put_u8(self.mission_mode);
20768            __tmp.put_u32_le(self.mission_id);
20769            __tmp.put_u32_le(self.fence_id);
20770            __tmp.put_u32_le(self.rally_points_id);
20771            let len = __tmp.len();
20772            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20773        } else {
20774            __tmp.len()
20775        }
20776    }
20777}
20778#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
20779#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20780#[doc = ""]
20781#[doc = "ID: 39"]
20782#[derive(Debug, Clone, PartialEq)]
20783#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20784#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20785#[cfg_attr(feature = "ts", derive(TS))]
20786#[cfg_attr(feature = "ts", ts(export))]
20787pub struct MISSION_ITEM_DATA {
20788    #[doc = "PARAM1, see MAV_CMD enum"]
20789    pub param1: f32,
20790    #[doc = "PARAM2, see MAV_CMD enum"]
20791    pub param2: f32,
20792    #[doc = "PARAM3, see MAV_CMD enum"]
20793    pub param3: f32,
20794    #[doc = "PARAM4, see MAV_CMD enum"]
20795    pub param4: f32,
20796    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20797    pub x: f32,
20798    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20799    pub y: f32,
20800    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20801    pub z: f32,
20802    #[doc = "Sequence"]
20803    pub seq: u16,
20804    #[doc = "The scheduled action for the waypoint."]
20805    pub command: MavCmd,
20806    #[doc = "System ID"]
20807    pub target_system: u8,
20808    #[doc = "Component ID"]
20809    pub target_component: u8,
20810    #[doc = "The coordinate system of the waypoint."]
20811    pub frame: MavFrame,
20812    #[doc = "false:0, true:1"]
20813    pub current: u8,
20814    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20815    pub autocontinue: u8,
20816    #[doc = "Mission type."]
20817    #[cfg_attr(feature = "serde", serde(default))]
20818    pub mission_type: MavMissionType,
20819}
20820impl MISSION_ITEM_DATA {
20821    pub const ENCODED_LEN: usize = 38usize;
20822    pub const DEFAULT: Self = Self {
20823        param1: 0.0_f32,
20824        param2: 0.0_f32,
20825        param3: 0.0_f32,
20826        param4: 0.0_f32,
20827        x: 0.0_f32,
20828        y: 0.0_f32,
20829        z: 0.0_f32,
20830        seq: 0_u16,
20831        command: MavCmd::DEFAULT,
20832        target_system: 0_u8,
20833        target_component: 0_u8,
20834        frame: MavFrame::DEFAULT,
20835        current: 0_u8,
20836        autocontinue: 0_u8,
20837        mission_type: MavMissionType::DEFAULT,
20838    };
20839    #[cfg(feature = "arbitrary")]
20840    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20841        use arbitrary::{Arbitrary, Unstructured};
20842        let mut buf = [0u8; 1024];
20843        rng.fill_bytes(&mut buf);
20844        let mut unstructured = Unstructured::new(&buf);
20845        Self::arbitrary(&mut unstructured).unwrap_or_default()
20846    }
20847}
20848impl Default for MISSION_ITEM_DATA {
20849    fn default() -> Self {
20850        Self::DEFAULT.clone()
20851    }
20852}
20853impl MessageData for MISSION_ITEM_DATA {
20854    type Message = MavMessage;
20855    const ID: u32 = 39u32;
20856    const NAME: &'static str = "MISSION_ITEM";
20857    const EXTRA_CRC: u8 = 254u8;
20858    const ENCODED_LEN: usize = 38usize;
20859    fn deser(
20860        _version: MavlinkVersion,
20861        __input: &[u8],
20862    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20863        let avail_len = __input.len();
20864        let mut payload_buf = [0; Self::ENCODED_LEN];
20865        let mut buf = if avail_len < Self::ENCODED_LEN {
20866            payload_buf[0..avail_len].copy_from_slice(__input);
20867            Bytes::new(&payload_buf)
20868        } else {
20869            Bytes::new(__input)
20870        };
20871        let mut __struct = Self::default();
20872        __struct.param1 = buf.get_f32_le()?;
20873        __struct.param2 = buf.get_f32_le()?;
20874        __struct.param3 = buf.get_f32_le()?;
20875        __struct.param4 = buf.get_f32_le()?;
20876        __struct.x = buf.get_f32_le()?;
20877        __struct.y = buf.get_f32_le()?;
20878        __struct.z = buf.get_f32_le()?;
20879        __struct.seq = buf.get_u16_le()?;
20880        let tmp = buf.get_u16_le()?;
20881        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20882            ::mavlink_core::error::ParserError::InvalidEnum {
20883                enum_type: "MavCmd",
20884                value: tmp as u64,
20885            },
20886        )?;
20887        __struct.target_system = buf.get_u8()?;
20888        __struct.target_component = buf.get_u8()?;
20889        let tmp = buf.get_u8()?;
20890        __struct.frame =
20891            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20892                enum_type: "MavFrame",
20893                value: tmp as u64,
20894            })?;
20895        __struct.current = buf.get_u8()?;
20896        __struct.autocontinue = buf.get_u8()?;
20897        let tmp = buf.get_u8()?;
20898        __struct.mission_type =
20899            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20900                enum_type: "MavMissionType",
20901                value: tmp as u64,
20902            })?;
20903        Ok(__struct)
20904    }
20905    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20906        let mut __tmp = BytesMut::new(bytes);
20907        #[allow(clippy::absurd_extreme_comparisons)]
20908        #[allow(unused_comparisons)]
20909        if __tmp.remaining() < Self::ENCODED_LEN {
20910            panic!(
20911                "buffer is too small (need {} bytes, but got {})",
20912                Self::ENCODED_LEN,
20913                __tmp.remaining(),
20914            )
20915        }
20916        __tmp.put_f32_le(self.param1);
20917        __tmp.put_f32_le(self.param2);
20918        __tmp.put_f32_le(self.param3);
20919        __tmp.put_f32_le(self.param4);
20920        __tmp.put_f32_le(self.x);
20921        __tmp.put_f32_le(self.y);
20922        __tmp.put_f32_le(self.z);
20923        __tmp.put_u16_le(self.seq);
20924        __tmp.put_u16_le(self.command as u16);
20925        __tmp.put_u8(self.target_system);
20926        __tmp.put_u8(self.target_component);
20927        __tmp.put_u8(self.frame as u8);
20928        __tmp.put_u8(self.current);
20929        __tmp.put_u8(self.autocontinue);
20930        if matches!(version, MavlinkVersion::V2) {
20931            __tmp.put_u8(self.mission_type as u8);
20932            let len = __tmp.len();
20933            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20934        } else {
20935            __tmp.len()
20936        }
20937    }
20938}
20939#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20940#[doc = ""]
20941#[doc = "ID: 73"]
20942#[derive(Debug, Clone, PartialEq)]
20943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20945#[cfg_attr(feature = "ts", derive(TS))]
20946#[cfg_attr(feature = "ts", ts(export))]
20947pub struct MISSION_ITEM_INT_DATA {
20948    #[doc = "PARAM1, see MAV_CMD enum"]
20949    pub param1: f32,
20950    #[doc = "PARAM2, see MAV_CMD enum"]
20951    pub param2: f32,
20952    #[doc = "PARAM3, see MAV_CMD enum"]
20953    pub param3: f32,
20954    #[doc = "PARAM4, see MAV_CMD enum"]
20955    pub param4: f32,
20956    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20957    pub x: i32,
20958    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20959    pub y: i32,
20960    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20961    pub z: f32,
20962    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20963    pub seq: u16,
20964    #[doc = "The scheduled action for the waypoint."]
20965    pub command: MavCmd,
20966    #[doc = "System ID"]
20967    pub target_system: u8,
20968    #[doc = "Component ID"]
20969    pub target_component: u8,
20970    #[doc = "The coordinate system of the waypoint."]
20971    pub frame: MavFrame,
20972    #[doc = "false:0, true:1"]
20973    pub current: u8,
20974    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20975    pub autocontinue: u8,
20976    #[doc = "Mission type."]
20977    #[cfg_attr(feature = "serde", serde(default))]
20978    pub mission_type: MavMissionType,
20979}
20980impl MISSION_ITEM_INT_DATA {
20981    pub const ENCODED_LEN: usize = 38usize;
20982    pub const DEFAULT: Self = Self {
20983        param1: 0.0_f32,
20984        param2: 0.0_f32,
20985        param3: 0.0_f32,
20986        param4: 0.0_f32,
20987        x: 0_i32,
20988        y: 0_i32,
20989        z: 0.0_f32,
20990        seq: 0_u16,
20991        command: MavCmd::DEFAULT,
20992        target_system: 0_u8,
20993        target_component: 0_u8,
20994        frame: MavFrame::DEFAULT,
20995        current: 0_u8,
20996        autocontinue: 0_u8,
20997        mission_type: MavMissionType::DEFAULT,
20998    };
20999    #[cfg(feature = "arbitrary")]
21000    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21001        use arbitrary::{Arbitrary, Unstructured};
21002        let mut buf = [0u8; 1024];
21003        rng.fill_bytes(&mut buf);
21004        let mut unstructured = Unstructured::new(&buf);
21005        Self::arbitrary(&mut unstructured).unwrap_or_default()
21006    }
21007}
21008impl Default for MISSION_ITEM_INT_DATA {
21009    fn default() -> Self {
21010        Self::DEFAULT.clone()
21011    }
21012}
21013impl MessageData for MISSION_ITEM_INT_DATA {
21014    type Message = MavMessage;
21015    const ID: u32 = 73u32;
21016    const NAME: &'static str = "MISSION_ITEM_INT";
21017    const EXTRA_CRC: u8 = 38u8;
21018    const ENCODED_LEN: usize = 38usize;
21019    fn deser(
21020        _version: MavlinkVersion,
21021        __input: &[u8],
21022    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21023        let avail_len = __input.len();
21024        let mut payload_buf = [0; Self::ENCODED_LEN];
21025        let mut buf = if avail_len < Self::ENCODED_LEN {
21026            payload_buf[0..avail_len].copy_from_slice(__input);
21027            Bytes::new(&payload_buf)
21028        } else {
21029            Bytes::new(__input)
21030        };
21031        let mut __struct = Self::default();
21032        __struct.param1 = buf.get_f32_le()?;
21033        __struct.param2 = buf.get_f32_le()?;
21034        __struct.param3 = buf.get_f32_le()?;
21035        __struct.param4 = buf.get_f32_le()?;
21036        __struct.x = buf.get_i32_le()?;
21037        __struct.y = buf.get_i32_le()?;
21038        __struct.z = buf.get_f32_le()?;
21039        __struct.seq = buf.get_u16_le()?;
21040        let tmp = buf.get_u16_le()?;
21041        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
21042            ::mavlink_core::error::ParserError::InvalidEnum {
21043                enum_type: "MavCmd",
21044                value: tmp as u64,
21045            },
21046        )?;
21047        __struct.target_system = buf.get_u8()?;
21048        __struct.target_component = buf.get_u8()?;
21049        let tmp = buf.get_u8()?;
21050        __struct.frame =
21051            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21052                enum_type: "MavFrame",
21053                value: tmp as u64,
21054            })?;
21055        __struct.current = buf.get_u8()?;
21056        __struct.autocontinue = buf.get_u8()?;
21057        let tmp = buf.get_u8()?;
21058        __struct.mission_type =
21059            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21060                enum_type: "MavMissionType",
21061                value: tmp as u64,
21062            })?;
21063        Ok(__struct)
21064    }
21065    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21066        let mut __tmp = BytesMut::new(bytes);
21067        #[allow(clippy::absurd_extreme_comparisons)]
21068        #[allow(unused_comparisons)]
21069        if __tmp.remaining() < Self::ENCODED_LEN {
21070            panic!(
21071                "buffer is too small (need {} bytes, but got {})",
21072                Self::ENCODED_LEN,
21073                __tmp.remaining(),
21074            )
21075        }
21076        __tmp.put_f32_le(self.param1);
21077        __tmp.put_f32_le(self.param2);
21078        __tmp.put_f32_le(self.param3);
21079        __tmp.put_f32_le(self.param4);
21080        __tmp.put_i32_le(self.x);
21081        __tmp.put_i32_le(self.y);
21082        __tmp.put_f32_le(self.z);
21083        __tmp.put_u16_le(self.seq);
21084        __tmp.put_u16_le(self.command as u16);
21085        __tmp.put_u8(self.target_system);
21086        __tmp.put_u8(self.target_component);
21087        __tmp.put_u8(self.frame as u8);
21088        __tmp.put_u8(self.current);
21089        __tmp.put_u8(self.autocontinue);
21090        if matches!(version, MavlinkVersion::V2) {
21091            __tmp.put_u8(self.mission_type as u8);
21092            let len = __tmp.len();
21093            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21094        } else {
21095            __tmp.len()
21096        }
21097    }
21098}
21099#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
21100#[doc = ""]
21101#[doc = "ID: 46"]
21102#[derive(Debug, Clone, PartialEq)]
21103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21104#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21105#[cfg_attr(feature = "ts", derive(TS))]
21106#[cfg_attr(feature = "ts", ts(export))]
21107pub struct MISSION_ITEM_REACHED_DATA {
21108    #[doc = "Sequence"]
21109    pub seq: u16,
21110}
21111impl MISSION_ITEM_REACHED_DATA {
21112    pub const ENCODED_LEN: usize = 2usize;
21113    pub const DEFAULT: Self = Self { seq: 0_u16 };
21114    #[cfg(feature = "arbitrary")]
21115    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21116        use arbitrary::{Arbitrary, Unstructured};
21117        let mut buf = [0u8; 1024];
21118        rng.fill_bytes(&mut buf);
21119        let mut unstructured = Unstructured::new(&buf);
21120        Self::arbitrary(&mut unstructured).unwrap_or_default()
21121    }
21122}
21123impl Default for MISSION_ITEM_REACHED_DATA {
21124    fn default() -> Self {
21125        Self::DEFAULT.clone()
21126    }
21127}
21128impl MessageData for MISSION_ITEM_REACHED_DATA {
21129    type Message = MavMessage;
21130    const ID: u32 = 46u32;
21131    const NAME: &'static str = "MISSION_ITEM_REACHED";
21132    const EXTRA_CRC: u8 = 11u8;
21133    const ENCODED_LEN: usize = 2usize;
21134    fn deser(
21135        _version: MavlinkVersion,
21136        __input: &[u8],
21137    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21138        let avail_len = __input.len();
21139        let mut payload_buf = [0; Self::ENCODED_LEN];
21140        let mut buf = if avail_len < Self::ENCODED_LEN {
21141            payload_buf[0..avail_len].copy_from_slice(__input);
21142            Bytes::new(&payload_buf)
21143        } else {
21144            Bytes::new(__input)
21145        };
21146        let mut __struct = Self::default();
21147        __struct.seq = buf.get_u16_le()?;
21148        Ok(__struct)
21149    }
21150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21151        let mut __tmp = BytesMut::new(bytes);
21152        #[allow(clippy::absurd_extreme_comparisons)]
21153        #[allow(unused_comparisons)]
21154        if __tmp.remaining() < Self::ENCODED_LEN {
21155            panic!(
21156                "buffer is too small (need {} bytes, but got {})",
21157                Self::ENCODED_LEN,
21158                __tmp.remaining(),
21159            )
21160        }
21161        __tmp.put_u16_le(self.seq);
21162        if matches!(version, MavlinkVersion::V2) {
21163            let len = __tmp.len();
21164            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21165        } else {
21166            __tmp.len()
21167        }
21168    }
21169}
21170#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
21171#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
21172#[doc = ""]
21173#[doc = "ID: 40"]
21174#[derive(Debug, Clone, PartialEq)]
21175#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21177#[cfg_attr(feature = "ts", derive(TS))]
21178#[cfg_attr(feature = "ts", ts(export))]
21179pub struct MISSION_REQUEST_DATA {
21180    #[doc = "Sequence"]
21181    pub seq: u16,
21182    #[doc = "System ID"]
21183    pub target_system: u8,
21184    #[doc = "Component ID"]
21185    pub target_component: u8,
21186    #[doc = "Mission type."]
21187    #[cfg_attr(feature = "serde", serde(default))]
21188    pub mission_type: MavMissionType,
21189}
21190impl MISSION_REQUEST_DATA {
21191    pub const ENCODED_LEN: usize = 5usize;
21192    pub const DEFAULT: Self = Self {
21193        seq: 0_u16,
21194        target_system: 0_u8,
21195        target_component: 0_u8,
21196        mission_type: MavMissionType::DEFAULT,
21197    };
21198    #[cfg(feature = "arbitrary")]
21199    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21200        use arbitrary::{Arbitrary, Unstructured};
21201        let mut buf = [0u8; 1024];
21202        rng.fill_bytes(&mut buf);
21203        let mut unstructured = Unstructured::new(&buf);
21204        Self::arbitrary(&mut unstructured).unwrap_or_default()
21205    }
21206}
21207impl Default for MISSION_REQUEST_DATA {
21208    fn default() -> Self {
21209        Self::DEFAULT.clone()
21210    }
21211}
21212impl MessageData for MISSION_REQUEST_DATA {
21213    type Message = MavMessage;
21214    const ID: u32 = 40u32;
21215    const NAME: &'static str = "MISSION_REQUEST";
21216    const EXTRA_CRC: u8 = 230u8;
21217    const ENCODED_LEN: usize = 5usize;
21218    fn deser(
21219        _version: MavlinkVersion,
21220        __input: &[u8],
21221    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21222        let avail_len = __input.len();
21223        let mut payload_buf = [0; Self::ENCODED_LEN];
21224        let mut buf = if avail_len < Self::ENCODED_LEN {
21225            payload_buf[0..avail_len].copy_from_slice(__input);
21226            Bytes::new(&payload_buf)
21227        } else {
21228            Bytes::new(__input)
21229        };
21230        let mut __struct = Self::default();
21231        __struct.seq = buf.get_u16_le()?;
21232        __struct.target_system = buf.get_u8()?;
21233        __struct.target_component = buf.get_u8()?;
21234        let tmp = buf.get_u8()?;
21235        __struct.mission_type =
21236            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21237                enum_type: "MavMissionType",
21238                value: tmp as u64,
21239            })?;
21240        Ok(__struct)
21241    }
21242    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21243        let mut __tmp = BytesMut::new(bytes);
21244        #[allow(clippy::absurd_extreme_comparisons)]
21245        #[allow(unused_comparisons)]
21246        if __tmp.remaining() < Self::ENCODED_LEN {
21247            panic!(
21248                "buffer is too small (need {} bytes, but got {})",
21249                Self::ENCODED_LEN,
21250                __tmp.remaining(),
21251            )
21252        }
21253        __tmp.put_u16_le(self.seq);
21254        __tmp.put_u8(self.target_system);
21255        __tmp.put_u8(self.target_component);
21256        if matches!(version, MavlinkVersion::V2) {
21257            __tmp.put_u8(self.mission_type as u8);
21258            let len = __tmp.len();
21259            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21260        } else {
21261            __tmp.len()
21262        }
21263    }
21264}
21265#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
21266#[doc = ""]
21267#[doc = "ID: 51"]
21268#[derive(Debug, Clone, PartialEq)]
21269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21271#[cfg_attr(feature = "ts", derive(TS))]
21272#[cfg_attr(feature = "ts", ts(export))]
21273pub struct MISSION_REQUEST_INT_DATA {
21274    #[doc = "Sequence"]
21275    pub seq: u16,
21276    #[doc = "System ID"]
21277    pub target_system: u8,
21278    #[doc = "Component ID"]
21279    pub target_component: u8,
21280    #[doc = "Mission type."]
21281    #[cfg_attr(feature = "serde", serde(default))]
21282    pub mission_type: MavMissionType,
21283}
21284impl MISSION_REQUEST_INT_DATA {
21285    pub const ENCODED_LEN: usize = 5usize;
21286    pub const DEFAULT: Self = Self {
21287        seq: 0_u16,
21288        target_system: 0_u8,
21289        target_component: 0_u8,
21290        mission_type: MavMissionType::DEFAULT,
21291    };
21292    #[cfg(feature = "arbitrary")]
21293    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21294        use arbitrary::{Arbitrary, Unstructured};
21295        let mut buf = [0u8; 1024];
21296        rng.fill_bytes(&mut buf);
21297        let mut unstructured = Unstructured::new(&buf);
21298        Self::arbitrary(&mut unstructured).unwrap_or_default()
21299    }
21300}
21301impl Default for MISSION_REQUEST_INT_DATA {
21302    fn default() -> Self {
21303        Self::DEFAULT.clone()
21304    }
21305}
21306impl MessageData for MISSION_REQUEST_INT_DATA {
21307    type Message = MavMessage;
21308    const ID: u32 = 51u32;
21309    const NAME: &'static str = "MISSION_REQUEST_INT";
21310    const EXTRA_CRC: u8 = 196u8;
21311    const ENCODED_LEN: usize = 5usize;
21312    fn deser(
21313        _version: MavlinkVersion,
21314        __input: &[u8],
21315    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21316        let avail_len = __input.len();
21317        let mut payload_buf = [0; Self::ENCODED_LEN];
21318        let mut buf = if avail_len < Self::ENCODED_LEN {
21319            payload_buf[0..avail_len].copy_from_slice(__input);
21320            Bytes::new(&payload_buf)
21321        } else {
21322            Bytes::new(__input)
21323        };
21324        let mut __struct = Self::default();
21325        __struct.seq = buf.get_u16_le()?;
21326        __struct.target_system = buf.get_u8()?;
21327        __struct.target_component = buf.get_u8()?;
21328        let tmp = buf.get_u8()?;
21329        __struct.mission_type =
21330            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21331                enum_type: "MavMissionType",
21332                value: tmp as u64,
21333            })?;
21334        Ok(__struct)
21335    }
21336    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21337        let mut __tmp = BytesMut::new(bytes);
21338        #[allow(clippy::absurd_extreme_comparisons)]
21339        #[allow(unused_comparisons)]
21340        if __tmp.remaining() < Self::ENCODED_LEN {
21341            panic!(
21342                "buffer is too small (need {} bytes, but got {})",
21343                Self::ENCODED_LEN,
21344                __tmp.remaining(),
21345            )
21346        }
21347        __tmp.put_u16_le(self.seq);
21348        __tmp.put_u8(self.target_system);
21349        __tmp.put_u8(self.target_component);
21350        if matches!(version, MavlinkVersion::V2) {
21351            __tmp.put_u8(self.mission_type as u8);
21352            let len = __tmp.len();
21353            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21354        } else {
21355            __tmp.len()
21356        }
21357    }
21358}
21359#[doc = "Request the overall list of mission items from the system/component."]
21360#[doc = ""]
21361#[doc = "ID: 43"]
21362#[derive(Debug, Clone, PartialEq)]
21363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21364#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21365#[cfg_attr(feature = "ts", derive(TS))]
21366#[cfg_attr(feature = "ts", ts(export))]
21367pub struct MISSION_REQUEST_LIST_DATA {
21368    #[doc = "System ID"]
21369    pub target_system: u8,
21370    #[doc = "Component ID"]
21371    pub target_component: u8,
21372    #[doc = "Mission type."]
21373    #[cfg_attr(feature = "serde", serde(default))]
21374    pub mission_type: MavMissionType,
21375}
21376impl MISSION_REQUEST_LIST_DATA {
21377    pub const ENCODED_LEN: usize = 3usize;
21378    pub const DEFAULT: Self = Self {
21379        target_system: 0_u8,
21380        target_component: 0_u8,
21381        mission_type: MavMissionType::DEFAULT,
21382    };
21383    #[cfg(feature = "arbitrary")]
21384    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21385        use arbitrary::{Arbitrary, Unstructured};
21386        let mut buf = [0u8; 1024];
21387        rng.fill_bytes(&mut buf);
21388        let mut unstructured = Unstructured::new(&buf);
21389        Self::arbitrary(&mut unstructured).unwrap_or_default()
21390    }
21391}
21392impl Default for MISSION_REQUEST_LIST_DATA {
21393    fn default() -> Self {
21394        Self::DEFAULT.clone()
21395    }
21396}
21397impl MessageData for MISSION_REQUEST_LIST_DATA {
21398    type Message = MavMessage;
21399    const ID: u32 = 43u32;
21400    const NAME: &'static str = "MISSION_REQUEST_LIST";
21401    const EXTRA_CRC: u8 = 132u8;
21402    const ENCODED_LEN: usize = 3usize;
21403    fn deser(
21404        _version: MavlinkVersion,
21405        __input: &[u8],
21406    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21407        let avail_len = __input.len();
21408        let mut payload_buf = [0; Self::ENCODED_LEN];
21409        let mut buf = if avail_len < Self::ENCODED_LEN {
21410            payload_buf[0..avail_len].copy_from_slice(__input);
21411            Bytes::new(&payload_buf)
21412        } else {
21413            Bytes::new(__input)
21414        };
21415        let mut __struct = Self::default();
21416        __struct.target_system = buf.get_u8()?;
21417        __struct.target_component = buf.get_u8()?;
21418        let tmp = buf.get_u8()?;
21419        __struct.mission_type =
21420            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21421                enum_type: "MavMissionType",
21422                value: tmp as u64,
21423            })?;
21424        Ok(__struct)
21425    }
21426    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21427        let mut __tmp = BytesMut::new(bytes);
21428        #[allow(clippy::absurd_extreme_comparisons)]
21429        #[allow(unused_comparisons)]
21430        if __tmp.remaining() < Self::ENCODED_LEN {
21431            panic!(
21432                "buffer is too small (need {} bytes, but got {})",
21433                Self::ENCODED_LEN,
21434                __tmp.remaining(),
21435            )
21436        }
21437        __tmp.put_u8(self.target_system);
21438        __tmp.put_u8(self.target_component);
21439        if matches!(version, MavlinkVersion::V2) {
21440            __tmp.put_u8(self.mission_type as u8);
21441            let len = __tmp.len();
21442            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21443        } else {
21444            __tmp.len()
21445        }
21446    }
21447}
21448#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
21449#[doc = ""]
21450#[doc = "ID: 37"]
21451#[derive(Debug, Clone, PartialEq)]
21452#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21453#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21454#[cfg_attr(feature = "ts", derive(TS))]
21455#[cfg_attr(feature = "ts", ts(export))]
21456pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
21457    #[doc = "Start index"]
21458    pub start_index: i16,
21459    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
21460    pub end_index: i16,
21461    #[doc = "System ID"]
21462    pub target_system: u8,
21463    #[doc = "Component ID"]
21464    pub target_component: u8,
21465    #[doc = "Mission type."]
21466    #[cfg_attr(feature = "serde", serde(default))]
21467    pub mission_type: MavMissionType,
21468}
21469impl MISSION_REQUEST_PARTIAL_LIST_DATA {
21470    pub const ENCODED_LEN: usize = 7usize;
21471    pub const DEFAULT: Self = Self {
21472        start_index: 0_i16,
21473        end_index: 0_i16,
21474        target_system: 0_u8,
21475        target_component: 0_u8,
21476        mission_type: MavMissionType::DEFAULT,
21477    };
21478    #[cfg(feature = "arbitrary")]
21479    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21480        use arbitrary::{Arbitrary, Unstructured};
21481        let mut buf = [0u8; 1024];
21482        rng.fill_bytes(&mut buf);
21483        let mut unstructured = Unstructured::new(&buf);
21484        Self::arbitrary(&mut unstructured).unwrap_or_default()
21485    }
21486}
21487impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
21488    fn default() -> Self {
21489        Self::DEFAULT.clone()
21490    }
21491}
21492impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
21493    type Message = MavMessage;
21494    const ID: u32 = 37u32;
21495    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
21496    const EXTRA_CRC: u8 = 212u8;
21497    const ENCODED_LEN: usize = 7usize;
21498    fn deser(
21499        _version: MavlinkVersion,
21500        __input: &[u8],
21501    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21502        let avail_len = __input.len();
21503        let mut payload_buf = [0; Self::ENCODED_LEN];
21504        let mut buf = if avail_len < Self::ENCODED_LEN {
21505            payload_buf[0..avail_len].copy_from_slice(__input);
21506            Bytes::new(&payload_buf)
21507        } else {
21508            Bytes::new(__input)
21509        };
21510        let mut __struct = Self::default();
21511        __struct.start_index = buf.get_i16_le()?;
21512        __struct.end_index = buf.get_i16_le()?;
21513        __struct.target_system = buf.get_u8()?;
21514        __struct.target_component = buf.get_u8()?;
21515        let tmp = buf.get_u8()?;
21516        __struct.mission_type =
21517            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21518                enum_type: "MavMissionType",
21519                value: tmp as u64,
21520            })?;
21521        Ok(__struct)
21522    }
21523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21524        let mut __tmp = BytesMut::new(bytes);
21525        #[allow(clippy::absurd_extreme_comparisons)]
21526        #[allow(unused_comparisons)]
21527        if __tmp.remaining() < Self::ENCODED_LEN {
21528            panic!(
21529                "buffer is too small (need {} bytes, but got {})",
21530                Self::ENCODED_LEN,
21531                __tmp.remaining(),
21532            )
21533        }
21534        __tmp.put_i16_le(self.start_index);
21535        __tmp.put_i16_le(self.end_index);
21536        __tmp.put_u8(self.target_system);
21537        __tmp.put_u8(self.target_component);
21538        if matches!(version, MavlinkVersion::V2) {
21539            __tmp.put_u8(self.mission_type as u8);
21540            let len = __tmp.len();
21541            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21542        } else {
21543            __tmp.len()
21544        }
21545    }
21546}
21547#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
21548#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
21549#[doc = ""]
21550#[doc = "ID: 41"]
21551#[derive(Debug, Clone, PartialEq)]
21552#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21553#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21554#[cfg_attr(feature = "ts", derive(TS))]
21555#[cfg_attr(feature = "ts", ts(export))]
21556pub struct MISSION_SET_CURRENT_DATA {
21557    #[doc = "Sequence"]
21558    pub seq: u16,
21559    #[doc = "System ID"]
21560    pub target_system: u8,
21561    #[doc = "Component ID"]
21562    pub target_component: u8,
21563}
21564impl MISSION_SET_CURRENT_DATA {
21565    pub const ENCODED_LEN: usize = 4usize;
21566    pub const DEFAULT: Self = Self {
21567        seq: 0_u16,
21568        target_system: 0_u8,
21569        target_component: 0_u8,
21570    };
21571    #[cfg(feature = "arbitrary")]
21572    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21573        use arbitrary::{Arbitrary, Unstructured};
21574        let mut buf = [0u8; 1024];
21575        rng.fill_bytes(&mut buf);
21576        let mut unstructured = Unstructured::new(&buf);
21577        Self::arbitrary(&mut unstructured).unwrap_or_default()
21578    }
21579}
21580impl Default for MISSION_SET_CURRENT_DATA {
21581    fn default() -> Self {
21582        Self::DEFAULT.clone()
21583    }
21584}
21585impl MessageData for MISSION_SET_CURRENT_DATA {
21586    type Message = MavMessage;
21587    const ID: u32 = 41u32;
21588    const NAME: &'static str = "MISSION_SET_CURRENT";
21589    const EXTRA_CRC: u8 = 28u8;
21590    const ENCODED_LEN: usize = 4usize;
21591    fn deser(
21592        _version: MavlinkVersion,
21593        __input: &[u8],
21594    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21595        let avail_len = __input.len();
21596        let mut payload_buf = [0; Self::ENCODED_LEN];
21597        let mut buf = if avail_len < Self::ENCODED_LEN {
21598            payload_buf[0..avail_len].copy_from_slice(__input);
21599            Bytes::new(&payload_buf)
21600        } else {
21601            Bytes::new(__input)
21602        };
21603        let mut __struct = Self::default();
21604        __struct.seq = buf.get_u16_le()?;
21605        __struct.target_system = buf.get_u8()?;
21606        __struct.target_component = buf.get_u8()?;
21607        Ok(__struct)
21608    }
21609    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21610        let mut __tmp = BytesMut::new(bytes);
21611        #[allow(clippy::absurd_extreme_comparisons)]
21612        #[allow(unused_comparisons)]
21613        if __tmp.remaining() < Self::ENCODED_LEN {
21614            panic!(
21615                "buffer is too small (need {} bytes, but got {})",
21616                Self::ENCODED_LEN,
21617                __tmp.remaining(),
21618            )
21619        }
21620        __tmp.put_u16_le(self.seq);
21621        __tmp.put_u8(self.target_system);
21622        __tmp.put_u8(self.target_component);
21623        if matches!(version, MavlinkVersion::V2) {
21624            let len = __tmp.len();
21625            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21626        } else {
21627            __tmp.len()
21628        }
21629    }
21630}
21631#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
21632#[doc = ""]
21633#[doc = "ID: 38"]
21634#[derive(Debug, Clone, PartialEq)]
21635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21637#[cfg_attr(feature = "ts", derive(TS))]
21638#[cfg_attr(feature = "ts", ts(export))]
21639pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
21640    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
21641    pub start_index: i16,
21642    #[doc = "End index, equal or greater than start index."]
21643    pub end_index: i16,
21644    #[doc = "System ID"]
21645    pub target_system: u8,
21646    #[doc = "Component ID"]
21647    pub target_component: u8,
21648    #[doc = "Mission type."]
21649    #[cfg_attr(feature = "serde", serde(default))]
21650    pub mission_type: MavMissionType,
21651}
21652impl MISSION_WRITE_PARTIAL_LIST_DATA {
21653    pub const ENCODED_LEN: usize = 7usize;
21654    pub const DEFAULT: Self = Self {
21655        start_index: 0_i16,
21656        end_index: 0_i16,
21657        target_system: 0_u8,
21658        target_component: 0_u8,
21659        mission_type: MavMissionType::DEFAULT,
21660    };
21661    #[cfg(feature = "arbitrary")]
21662    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21663        use arbitrary::{Arbitrary, Unstructured};
21664        let mut buf = [0u8; 1024];
21665        rng.fill_bytes(&mut buf);
21666        let mut unstructured = Unstructured::new(&buf);
21667        Self::arbitrary(&mut unstructured).unwrap_or_default()
21668    }
21669}
21670impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
21671    fn default() -> Self {
21672        Self::DEFAULT.clone()
21673    }
21674}
21675impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
21676    type Message = MavMessage;
21677    const ID: u32 = 38u32;
21678    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
21679    const EXTRA_CRC: u8 = 9u8;
21680    const ENCODED_LEN: usize = 7usize;
21681    fn deser(
21682        _version: MavlinkVersion,
21683        __input: &[u8],
21684    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21685        let avail_len = __input.len();
21686        let mut payload_buf = [0; Self::ENCODED_LEN];
21687        let mut buf = if avail_len < Self::ENCODED_LEN {
21688            payload_buf[0..avail_len].copy_from_slice(__input);
21689            Bytes::new(&payload_buf)
21690        } else {
21691            Bytes::new(__input)
21692        };
21693        let mut __struct = Self::default();
21694        __struct.start_index = buf.get_i16_le()?;
21695        __struct.end_index = buf.get_i16_le()?;
21696        __struct.target_system = buf.get_u8()?;
21697        __struct.target_component = buf.get_u8()?;
21698        let tmp = buf.get_u8()?;
21699        __struct.mission_type =
21700            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21701                enum_type: "MavMissionType",
21702                value: tmp as u64,
21703            })?;
21704        Ok(__struct)
21705    }
21706    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21707        let mut __tmp = BytesMut::new(bytes);
21708        #[allow(clippy::absurd_extreme_comparisons)]
21709        #[allow(unused_comparisons)]
21710        if __tmp.remaining() < Self::ENCODED_LEN {
21711            panic!(
21712                "buffer is too small (need {} bytes, but got {})",
21713                Self::ENCODED_LEN,
21714                __tmp.remaining(),
21715            )
21716        }
21717        __tmp.put_i16_le(self.start_index);
21718        __tmp.put_i16_le(self.end_index);
21719        __tmp.put_u8(self.target_system);
21720        __tmp.put_u8(self.target_component);
21721        if matches!(version, MavlinkVersion::V2) {
21722            __tmp.put_u8(self.mission_type as u8);
21723            let len = __tmp.len();
21724            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21725        } else {
21726            __tmp.len()
21727        }
21728    }
21729}
21730#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
21731#[doc = "Orientation of a mount."]
21732#[doc = ""]
21733#[doc = "ID: 265"]
21734#[derive(Debug, Clone, PartialEq)]
21735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21737#[cfg_attr(feature = "ts", derive(TS))]
21738#[cfg_attr(feature = "ts", ts(export))]
21739pub struct MOUNT_ORIENTATION_DATA {
21740    #[doc = "Timestamp (time since system boot)."]
21741    pub time_boot_ms: u32,
21742    #[doc = "Roll in global frame (set to NaN for invalid)."]
21743    pub roll: f32,
21744    #[doc = "Pitch in global frame (set to NaN for invalid)."]
21745    pub pitch: f32,
21746    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
21747    pub yaw: f32,
21748    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
21749    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21750    pub yaw_absolute: f32,
21751}
21752impl MOUNT_ORIENTATION_DATA {
21753    pub const ENCODED_LEN: usize = 20usize;
21754    pub const DEFAULT: Self = Self {
21755        time_boot_ms: 0_u32,
21756        roll: 0.0_f32,
21757        pitch: 0.0_f32,
21758        yaw: 0.0_f32,
21759        yaw_absolute: 0.0_f32,
21760    };
21761    #[cfg(feature = "arbitrary")]
21762    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21763        use arbitrary::{Arbitrary, Unstructured};
21764        let mut buf = [0u8; 1024];
21765        rng.fill_bytes(&mut buf);
21766        let mut unstructured = Unstructured::new(&buf);
21767        Self::arbitrary(&mut unstructured).unwrap_or_default()
21768    }
21769}
21770impl Default for MOUNT_ORIENTATION_DATA {
21771    fn default() -> Self {
21772        Self::DEFAULT.clone()
21773    }
21774}
21775impl MessageData for MOUNT_ORIENTATION_DATA {
21776    type Message = MavMessage;
21777    const ID: u32 = 265u32;
21778    const NAME: &'static str = "MOUNT_ORIENTATION";
21779    const EXTRA_CRC: u8 = 26u8;
21780    const ENCODED_LEN: usize = 20usize;
21781    fn deser(
21782        _version: MavlinkVersion,
21783        __input: &[u8],
21784    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21785        let avail_len = __input.len();
21786        let mut payload_buf = [0; Self::ENCODED_LEN];
21787        let mut buf = if avail_len < Self::ENCODED_LEN {
21788            payload_buf[0..avail_len].copy_from_slice(__input);
21789            Bytes::new(&payload_buf)
21790        } else {
21791            Bytes::new(__input)
21792        };
21793        let mut __struct = Self::default();
21794        __struct.time_boot_ms = buf.get_u32_le()?;
21795        __struct.roll = buf.get_f32_le()?;
21796        __struct.pitch = buf.get_f32_le()?;
21797        __struct.yaw = buf.get_f32_le()?;
21798        __struct.yaw_absolute = buf.get_f32_le()?;
21799        Ok(__struct)
21800    }
21801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21802        let mut __tmp = BytesMut::new(bytes);
21803        #[allow(clippy::absurd_extreme_comparisons)]
21804        #[allow(unused_comparisons)]
21805        if __tmp.remaining() < Self::ENCODED_LEN {
21806            panic!(
21807                "buffer is too small (need {} bytes, but got {})",
21808                Self::ENCODED_LEN,
21809                __tmp.remaining(),
21810            )
21811        }
21812        __tmp.put_u32_le(self.time_boot_ms);
21813        __tmp.put_f32_le(self.roll);
21814        __tmp.put_f32_le(self.pitch);
21815        __tmp.put_f32_le(self.yaw);
21816        if matches!(version, MavlinkVersion::V2) {
21817            __tmp.put_f32_le(self.yaw_absolute);
21818            let len = __tmp.len();
21819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21820        } else {
21821            __tmp.len()
21822        }
21823    }
21824}
21825#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21826#[doc = ""]
21827#[doc = "ID: 251"]
21828#[derive(Debug, Clone, PartialEq)]
21829#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21831#[cfg_attr(feature = "ts", derive(TS))]
21832#[cfg_attr(feature = "ts", ts(export))]
21833pub struct NAMED_VALUE_FLOAT_DATA {
21834    #[doc = "Timestamp (time since system boot)."]
21835    pub time_boot_ms: u32,
21836    #[doc = "Floating point value"]
21837    pub value: f32,
21838    #[doc = "Name of the debug variable"]
21839    #[cfg_attr(feature = "ts", ts(type = "string"))]
21840    pub name: CharArray<10>,
21841}
21842impl NAMED_VALUE_FLOAT_DATA {
21843    pub const ENCODED_LEN: usize = 18usize;
21844    pub const DEFAULT: Self = Self {
21845        time_boot_ms: 0_u32,
21846        value: 0.0_f32,
21847        name: CharArray::new([0_u8; 10usize]),
21848    };
21849    #[cfg(feature = "arbitrary")]
21850    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21851        use arbitrary::{Arbitrary, Unstructured};
21852        let mut buf = [0u8; 1024];
21853        rng.fill_bytes(&mut buf);
21854        let mut unstructured = Unstructured::new(&buf);
21855        Self::arbitrary(&mut unstructured).unwrap_or_default()
21856    }
21857}
21858impl Default for NAMED_VALUE_FLOAT_DATA {
21859    fn default() -> Self {
21860        Self::DEFAULT.clone()
21861    }
21862}
21863impl MessageData for NAMED_VALUE_FLOAT_DATA {
21864    type Message = MavMessage;
21865    const ID: u32 = 251u32;
21866    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21867    const EXTRA_CRC: u8 = 170u8;
21868    const ENCODED_LEN: usize = 18usize;
21869    fn deser(
21870        _version: MavlinkVersion,
21871        __input: &[u8],
21872    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21873        let avail_len = __input.len();
21874        let mut payload_buf = [0; Self::ENCODED_LEN];
21875        let mut buf = if avail_len < Self::ENCODED_LEN {
21876            payload_buf[0..avail_len].copy_from_slice(__input);
21877            Bytes::new(&payload_buf)
21878        } else {
21879            Bytes::new(__input)
21880        };
21881        let mut __struct = Self::default();
21882        __struct.time_boot_ms = buf.get_u32_le()?;
21883        __struct.value = buf.get_f32_le()?;
21884        let mut tmp = [0_u8; 10usize];
21885        for v in &mut tmp {
21886            *v = buf.get_u8()?;
21887        }
21888        __struct.name = CharArray::new(tmp);
21889        Ok(__struct)
21890    }
21891    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21892        let mut __tmp = BytesMut::new(bytes);
21893        #[allow(clippy::absurd_extreme_comparisons)]
21894        #[allow(unused_comparisons)]
21895        if __tmp.remaining() < Self::ENCODED_LEN {
21896            panic!(
21897                "buffer is too small (need {} bytes, but got {})",
21898                Self::ENCODED_LEN,
21899                __tmp.remaining(),
21900            )
21901        }
21902        __tmp.put_u32_le(self.time_boot_ms);
21903        __tmp.put_f32_le(self.value);
21904        for val in &self.name {
21905            __tmp.put_u8(*val);
21906        }
21907        if matches!(version, MavlinkVersion::V2) {
21908            let len = __tmp.len();
21909            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21910        } else {
21911            __tmp.len()
21912        }
21913    }
21914}
21915#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21916#[doc = ""]
21917#[doc = "ID: 252"]
21918#[derive(Debug, Clone, PartialEq)]
21919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21921#[cfg_attr(feature = "ts", derive(TS))]
21922#[cfg_attr(feature = "ts", ts(export))]
21923pub struct NAMED_VALUE_INT_DATA {
21924    #[doc = "Timestamp (time since system boot)."]
21925    pub time_boot_ms: u32,
21926    #[doc = "Signed integer value"]
21927    pub value: i32,
21928    #[doc = "Name of the debug variable"]
21929    #[cfg_attr(feature = "ts", ts(type = "string"))]
21930    pub name: CharArray<10>,
21931}
21932impl NAMED_VALUE_INT_DATA {
21933    pub const ENCODED_LEN: usize = 18usize;
21934    pub const DEFAULT: Self = Self {
21935        time_boot_ms: 0_u32,
21936        value: 0_i32,
21937        name: CharArray::new([0_u8; 10usize]),
21938    };
21939    #[cfg(feature = "arbitrary")]
21940    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21941        use arbitrary::{Arbitrary, Unstructured};
21942        let mut buf = [0u8; 1024];
21943        rng.fill_bytes(&mut buf);
21944        let mut unstructured = Unstructured::new(&buf);
21945        Self::arbitrary(&mut unstructured).unwrap_or_default()
21946    }
21947}
21948impl Default for NAMED_VALUE_INT_DATA {
21949    fn default() -> Self {
21950        Self::DEFAULT.clone()
21951    }
21952}
21953impl MessageData for NAMED_VALUE_INT_DATA {
21954    type Message = MavMessage;
21955    const ID: u32 = 252u32;
21956    const NAME: &'static str = "NAMED_VALUE_INT";
21957    const EXTRA_CRC: u8 = 44u8;
21958    const ENCODED_LEN: usize = 18usize;
21959    fn deser(
21960        _version: MavlinkVersion,
21961        __input: &[u8],
21962    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21963        let avail_len = __input.len();
21964        let mut payload_buf = [0; Self::ENCODED_LEN];
21965        let mut buf = if avail_len < Self::ENCODED_LEN {
21966            payload_buf[0..avail_len].copy_from_slice(__input);
21967            Bytes::new(&payload_buf)
21968        } else {
21969            Bytes::new(__input)
21970        };
21971        let mut __struct = Self::default();
21972        __struct.time_boot_ms = buf.get_u32_le()?;
21973        __struct.value = buf.get_i32_le()?;
21974        let mut tmp = [0_u8; 10usize];
21975        for v in &mut tmp {
21976            *v = buf.get_u8()?;
21977        }
21978        __struct.name = CharArray::new(tmp);
21979        Ok(__struct)
21980    }
21981    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21982        let mut __tmp = BytesMut::new(bytes);
21983        #[allow(clippy::absurd_extreme_comparisons)]
21984        #[allow(unused_comparisons)]
21985        if __tmp.remaining() < Self::ENCODED_LEN {
21986            panic!(
21987                "buffer is too small (need {} bytes, but got {})",
21988                Self::ENCODED_LEN,
21989                __tmp.remaining(),
21990            )
21991        }
21992        __tmp.put_u32_le(self.time_boot_ms);
21993        __tmp.put_i32_le(self.value);
21994        for val in &self.name {
21995            __tmp.put_u8(*val);
21996        }
21997        if matches!(version, MavlinkVersion::V2) {
21998            let len = __tmp.len();
21999            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22000        } else {
22001            __tmp.len()
22002        }
22003    }
22004}
22005#[doc = "The state of the navigation and position controller."]
22006#[doc = ""]
22007#[doc = "ID: 62"]
22008#[derive(Debug, Clone, PartialEq)]
22009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22011#[cfg_attr(feature = "ts", derive(TS))]
22012#[cfg_attr(feature = "ts", ts(export))]
22013pub struct NAV_CONTROLLER_OUTPUT_DATA {
22014    #[doc = "Current desired roll"]
22015    pub nav_roll: f32,
22016    #[doc = "Current desired pitch"]
22017    pub nav_pitch: f32,
22018    #[doc = "Current altitude error"]
22019    pub alt_error: f32,
22020    #[doc = "Current airspeed error"]
22021    pub aspd_error: f32,
22022    #[doc = "Current crosstrack error on x-y plane"]
22023    pub xtrack_error: f32,
22024    #[doc = "Current desired heading"]
22025    pub nav_bearing: i16,
22026    #[doc = "Bearing to current waypoint/target"]
22027    pub target_bearing: i16,
22028    #[doc = "Distance to active waypoint"]
22029    pub wp_dist: u16,
22030}
22031impl NAV_CONTROLLER_OUTPUT_DATA {
22032    pub const ENCODED_LEN: usize = 26usize;
22033    pub const DEFAULT: Self = Self {
22034        nav_roll: 0.0_f32,
22035        nav_pitch: 0.0_f32,
22036        alt_error: 0.0_f32,
22037        aspd_error: 0.0_f32,
22038        xtrack_error: 0.0_f32,
22039        nav_bearing: 0_i16,
22040        target_bearing: 0_i16,
22041        wp_dist: 0_u16,
22042    };
22043    #[cfg(feature = "arbitrary")]
22044    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22045        use arbitrary::{Arbitrary, Unstructured};
22046        let mut buf = [0u8; 1024];
22047        rng.fill_bytes(&mut buf);
22048        let mut unstructured = Unstructured::new(&buf);
22049        Self::arbitrary(&mut unstructured).unwrap_or_default()
22050    }
22051}
22052impl Default for NAV_CONTROLLER_OUTPUT_DATA {
22053    fn default() -> Self {
22054        Self::DEFAULT.clone()
22055    }
22056}
22057impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
22058    type Message = MavMessage;
22059    const ID: u32 = 62u32;
22060    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
22061    const EXTRA_CRC: u8 = 183u8;
22062    const ENCODED_LEN: usize = 26usize;
22063    fn deser(
22064        _version: MavlinkVersion,
22065        __input: &[u8],
22066    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22067        let avail_len = __input.len();
22068        let mut payload_buf = [0; Self::ENCODED_LEN];
22069        let mut buf = if avail_len < Self::ENCODED_LEN {
22070            payload_buf[0..avail_len].copy_from_slice(__input);
22071            Bytes::new(&payload_buf)
22072        } else {
22073            Bytes::new(__input)
22074        };
22075        let mut __struct = Self::default();
22076        __struct.nav_roll = buf.get_f32_le()?;
22077        __struct.nav_pitch = buf.get_f32_le()?;
22078        __struct.alt_error = buf.get_f32_le()?;
22079        __struct.aspd_error = buf.get_f32_le()?;
22080        __struct.xtrack_error = buf.get_f32_le()?;
22081        __struct.nav_bearing = buf.get_i16_le()?;
22082        __struct.target_bearing = buf.get_i16_le()?;
22083        __struct.wp_dist = buf.get_u16_le()?;
22084        Ok(__struct)
22085    }
22086    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22087        let mut __tmp = BytesMut::new(bytes);
22088        #[allow(clippy::absurd_extreme_comparisons)]
22089        #[allow(unused_comparisons)]
22090        if __tmp.remaining() < Self::ENCODED_LEN {
22091            panic!(
22092                "buffer is too small (need {} bytes, but got {})",
22093                Self::ENCODED_LEN,
22094                __tmp.remaining(),
22095            )
22096        }
22097        __tmp.put_f32_le(self.nav_roll);
22098        __tmp.put_f32_le(self.nav_pitch);
22099        __tmp.put_f32_le(self.alt_error);
22100        __tmp.put_f32_le(self.aspd_error);
22101        __tmp.put_f32_le(self.xtrack_error);
22102        __tmp.put_i16_le(self.nav_bearing);
22103        __tmp.put_i16_le(self.target_bearing);
22104        __tmp.put_u16_le(self.wp_dist);
22105        if matches!(version, MavlinkVersion::V2) {
22106            let len = __tmp.len();
22107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22108        } else {
22109            __tmp.len()
22110        }
22111    }
22112}
22113#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
22114#[doc = ""]
22115#[doc = "ID: 330"]
22116#[derive(Debug, Clone, PartialEq)]
22117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22119#[cfg_attr(feature = "ts", derive(TS))]
22120#[cfg_attr(feature = "ts", ts(export))]
22121pub struct OBSTACLE_DISTANCE_DATA {
22122    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22123    pub time_usec: u64,
22124    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
22125    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22126    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22127    pub distances: [u16; 72],
22128    #[doc = "Minimum distance the sensor can measure."]
22129    pub min_distance: u16,
22130    #[doc = "Maximum distance the sensor can measure."]
22131    pub max_distance: u16,
22132    #[doc = "Class id of the distance sensor type."]
22133    pub sensor_type: MavDistanceSensor,
22134    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
22135    pub increment: u8,
22136    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
22137    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22138    pub increment_f: f32,
22139    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
22140    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22141    pub angle_offset: f32,
22142    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
22143    #[cfg_attr(feature = "serde", serde(default))]
22144    pub frame: MavFrame,
22145}
22146impl OBSTACLE_DISTANCE_DATA {
22147    pub const ENCODED_LEN: usize = 167usize;
22148    pub const DEFAULT: Self = Self {
22149        time_usec: 0_u64,
22150        distances: [0_u16; 72usize],
22151        min_distance: 0_u16,
22152        max_distance: 0_u16,
22153        sensor_type: MavDistanceSensor::DEFAULT,
22154        increment: 0_u8,
22155        increment_f: 0.0_f32,
22156        angle_offset: 0.0_f32,
22157        frame: MavFrame::DEFAULT,
22158    };
22159    #[cfg(feature = "arbitrary")]
22160    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22161        use arbitrary::{Arbitrary, Unstructured};
22162        let mut buf = [0u8; 1024];
22163        rng.fill_bytes(&mut buf);
22164        let mut unstructured = Unstructured::new(&buf);
22165        Self::arbitrary(&mut unstructured).unwrap_or_default()
22166    }
22167}
22168impl Default for OBSTACLE_DISTANCE_DATA {
22169    fn default() -> Self {
22170        Self::DEFAULT.clone()
22171    }
22172}
22173impl MessageData for OBSTACLE_DISTANCE_DATA {
22174    type Message = MavMessage;
22175    const ID: u32 = 330u32;
22176    const NAME: &'static str = "OBSTACLE_DISTANCE";
22177    const EXTRA_CRC: u8 = 23u8;
22178    const ENCODED_LEN: usize = 167usize;
22179    fn deser(
22180        _version: MavlinkVersion,
22181        __input: &[u8],
22182    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22183        let avail_len = __input.len();
22184        let mut payload_buf = [0; Self::ENCODED_LEN];
22185        let mut buf = if avail_len < Self::ENCODED_LEN {
22186            payload_buf[0..avail_len].copy_from_slice(__input);
22187            Bytes::new(&payload_buf)
22188        } else {
22189            Bytes::new(__input)
22190        };
22191        let mut __struct = Self::default();
22192        __struct.time_usec = buf.get_u64_le()?;
22193        for v in &mut __struct.distances {
22194            let val = buf.get_u16_le()?;
22195            *v = val;
22196        }
22197        __struct.min_distance = buf.get_u16_le()?;
22198        __struct.max_distance = buf.get_u16_le()?;
22199        let tmp = buf.get_u8()?;
22200        __struct.sensor_type =
22201            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22202                enum_type: "MavDistanceSensor",
22203                value: tmp as u64,
22204            })?;
22205        __struct.increment = buf.get_u8()?;
22206        __struct.increment_f = buf.get_f32_le()?;
22207        __struct.angle_offset = buf.get_f32_le()?;
22208        let tmp = buf.get_u8()?;
22209        __struct.frame =
22210            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22211                enum_type: "MavFrame",
22212                value: tmp as u64,
22213            })?;
22214        Ok(__struct)
22215    }
22216    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22217        let mut __tmp = BytesMut::new(bytes);
22218        #[allow(clippy::absurd_extreme_comparisons)]
22219        #[allow(unused_comparisons)]
22220        if __tmp.remaining() < Self::ENCODED_LEN {
22221            panic!(
22222                "buffer is too small (need {} bytes, but got {})",
22223                Self::ENCODED_LEN,
22224                __tmp.remaining(),
22225            )
22226        }
22227        __tmp.put_u64_le(self.time_usec);
22228        for val in &self.distances {
22229            __tmp.put_u16_le(*val);
22230        }
22231        __tmp.put_u16_le(self.min_distance);
22232        __tmp.put_u16_le(self.max_distance);
22233        __tmp.put_u8(self.sensor_type as u8);
22234        __tmp.put_u8(self.increment);
22235        if matches!(version, MavlinkVersion::V2) {
22236            __tmp.put_f32_le(self.increment_f);
22237            __tmp.put_f32_le(self.angle_offset);
22238            __tmp.put_u8(self.frame as u8);
22239            let len = __tmp.len();
22240            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22241        } else {
22242            __tmp.len()
22243        }
22244    }
22245}
22246#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
22247#[doc = ""]
22248#[doc = "ID: 331"]
22249#[derive(Debug, Clone, PartialEq)]
22250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22252#[cfg_attr(feature = "ts", derive(TS))]
22253#[cfg_attr(feature = "ts", ts(export))]
22254pub struct ODOMETRY_DATA {
22255    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22256    pub time_usec: u64,
22257    #[doc = "X Position"]
22258    pub x: f32,
22259    #[doc = "Y Position"]
22260    pub y: f32,
22261    #[doc = "Z Position"]
22262    pub z: f32,
22263    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
22264    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22265    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22266    pub q: [f32; 4],
22267    #[doc = "X linear speed"]
22268    pub vx: f32,
22269    #[doc = "Y linear speed"]
22270    pub vy: f32,
22271    #[doc = "Z linear speed"]
22272    pub vz: f32,
22273    #[doc = "Roll angular speed"]
22274    pub rollspeed: f32,
22275    #[doc = "Pitch angular speed"]
22276    pub pitchspeed: f32,
22277    #[doc = "Yaw angular speed"]
22278    pub yawspeed: f32,
22279    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
22280    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22281    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22282    pub pose_covariance: [f32; 21],
22283    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
22284    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22285    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22286    pub velocity_covariance: [f32; 21],
22287    #[doc = "Coordinate frame of reference for the pose data."]
22288    pub frame_id: MavFrame,
22289    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
22290    pub child_frame_id: MavFrame,
22291    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
22292    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22293    pub reset_counter: u8,
22294    #[doc = "Type of estimator that is providing the odometry."]
22295    #[cfg_attr(feature = "serde", serde(default))]
22296    pub estimator_type: MavEstimatorType,
22297    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
22298    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22299    pub quality: i8,
22300}
22301impl ODOMETRY_DATA {
22302    pub const ENCODED_LEN: usize = 233usize;
22303    pub const DEFAULT: Self = Self {
22304        time_usec: 0_u64,
22305        x: 0.0_f32,
22306        y: 0.0_f32,
22307        z: 0.0_f32,
22308        q: [0.0_f32; 4usize],
22309        vx: 0.0_f32,
22310        vy: 0.0_f32,
22311        vz: 0.0_f32,
22312        rollspeed: 0.0_f32,
22313        pitchspeed: 0.0_f32,
22314        yawspeed: 0.0_f32,
22315        pose_covariance: [0.0_f32; 21usize],
22316        velocity_covariance: [0.0_f32; 21usize],
22317        frame_id: MavFrame::DEFAULT,
22318        child_frame_id: MavFrame::DEFAULT,
22319        reset_counter: 0_u8,
22320        estimator_type: MavEstimatorType::DEFAULT,
22321        quality: 0_i8,
22322    };
22323    #[cfg(feature = "arbitrary")]
22324    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22325        use arbitrary::{Arbitrary, Unstructured};
22326        let mut buf = [0u8; 1024];
22327        rng.fill_bytes(&mut buf);
22328        let mut unstructured = Unstructured::new(&buf);
22329        Self::arbitrary(&mut unstructured).unwrap_or_default()
22330    }
22331}
22332impl Default for ODOMETRY_DATA {
22333    fn default() -> Self {
22334        Self::DEFAULT.clone()
22335    }
22336}
22337impl MessageData for ODOMETRY_DATA {
22338    type Message = MavMessage;
22339    const ID: u32 = 331u32;
22340    const NAME: &'static str = "ODOMETRY";
22341    const EXTRA_CRC: u8 = 91u8;
22342    const ENCODED_LEN: usize = 233usize;
22343    fn deser(
22344        _version: MavlinkVersion,
22345        __input: &[u8],
22346    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22347        let avail_len = __input.len();
22348        let mut payload_buf = [0; Self::ENCODED_LEN];
22349        let mut buf = if avail_len < Self::ENCODED_LEN {
22350            payload_buf[0..avail_len].copy_from_slice(__input);
22351            Bytes::new(&payload_buf)
22352        } else {
22353            Bytes::new(__input)
22354        };
22355        let mut __struct = Self::default();
22356        __struct.time_usec = buf.get_u64_le()?;
22357        __struct.x = buf.get_f32_le()?;
22358        __struct.y = buf.get_f32_le()?;
22359        __struct.z = buf.get_f32_le()?;
22360        for v in &mut __struct.q {
22361            let val = buf.get_f32_le()?;
22362            *v = val;
22363        }
22364        __struct.vx = buf.get_f32_le()?;
22365        __struct.vy = buf.get_f32_le()?;
22366        __struct.vz = buf.get_f32_le()?;
22367        __struct.rollspeed = buf.get_f32_le()?;
22368        __struct.pitchspeed = buf.get_f32_le()?;
22369        __struct.yawspeed = buf.get_f32_le()?;
22370        for v in &mut __struct.pose_covariance {
22371            let val = buf.get_f32_le()?;
22372            *v = val;
22373        }
22374        for v in &mut __struct.velocity_covariance {
22375            let val = buf.get_f32_le()?;
22376            *v = val;
22377        }
22378        let tmp = buf.get_u8()?;
22379        __struct.frame_id =
22380            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22381                enum_type: "MavFrame",
22382                value: tmp as u64,
22383            })?;
22384        let tmp = buf.get_u8()?;
22385        __struct.child_frame_id =
22386            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22387                enum_type: "MavFrame",
22388                value: tmp as u64,
22389            })?;
22390        __struct.reset_counter = buf.get_u8()?;
22391        let tmp = buf.get_u8()?;
22392        __struct.estimator_type =
22393            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22394                enum_type: "MavEstimatorType",
22395                value: tmp as u64,
22396            })?;
22397        __struct.quality = buf.get_i8()?;
22398        Ok(__struct)
22399    }
22400    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22401        let mut __tmp = BytesMut::new(bytes);
22402        #[allow(clippy::absurd_extreme_comparisons)]
22403        #[allow(unused_comparisons)]
22404        if __tmp.remaining() < Self::ENCODED_LEN {
22405            panic!(
22406                "buffer is too small (need {} bytes, but got {})",
22407                Self::ENCODED_LEN,
22408                __tmp.remaining(),
22409            )
22410        }
22411        __tmp.put_u64_le(self.time_usec);
22412        __tmp.put_f32_le(self.x);
22413        __tmp.put_f32_le(self.y);
22414        __tmp.put_f32_le(self.z);
22415        for val in &self.q {
22416            __tmp.put_f32_le(*val);
22417        }
22418        __tmp.put_f32_le(self.vx);
22419        __tmp.put_f32_le(self.vy);
22420        __tmp.put_f32_le(self.vz);
22421        __tmp.put_f32_le(self.rollspeed);
22422        __tmp.put_f32_le(self.pitchspeed);
22423        __tmp.put_f32_le(self.yawspeed);
22424        for val in &self.pose_covariance {
22425            __tmp.put_f32_le(*val);
22426        }
22427        for val in &self.velocity_covariance {
22428            __tmp.put_f32_le(*val);
22429        }
22430        __tmp.put_u8(self.frame_id as u8);
22431        __tmp.put_u8(self.child_frame_id as u8);
22432        if matches!(version, MavlinkVersion::V2) {
22433            __tmp.put_u8(self.reset_counter);
22434            __tmp.put_u8(self.estimator_type as u8);
22435            __tmp.put_i8(self.quality);
22436            let len = __tmp.len();
22437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22438        } else {
22439            __tmp.len()
22440        }
22441    }
22442}
22443#[doc = "Hardware status sent by an onboard computer."]
22444#[doc = ""]
22445#[doc = "ID: 390"]
22446#[derive(Debug, Clone, PartialEq)]
22447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22449#[cfg_attr(feature = "ts", derive(TS))]
22450#[cfg_attr(feature = "ts", ts(export))]
22451pub struct ONBOARD_COMPUTER_STATUS_DATA {
22452    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22453    pub time_usec: u64,
22454    #[doc = "Time since system boot."]
22455    pub uptime: u32,
22456    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22457    pub ram_usage: u32,
22458    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22459    pub ram_total: u32,
22460    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
22461    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22462    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22463    pub storage_type: [u32; 4],
22464    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22465    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22466    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22467    pub storage_usage: [u32; 4],
22468    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22469    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22470    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22471    pub storage_total: [u32; 4],
22472    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
22473    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22474    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22475    pub link_type: [u32; 6],
22476    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
22477    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22478    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22479    pub link_tx_rate: [u32; 6],
22480    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
22481    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22482    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22483    pub link_rx_rate: [u32; 6],
22484    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
22485    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22486    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22487    pub link_tx_max: [u32; 6],
22488    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
22489    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22490    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22491    pub link_rx_max: [u32; 6],
22492    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
22493    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22494    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22495    pub fan_speed: [i16; 4],
22496    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
22497    pub mavtype: u8,
22498    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22499    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22500    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22501    pub cpu_cores: [u8; 8],
22502    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22503    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22504    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22505    pub cpu_combined: [u8; 10],
22506    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22507    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22508    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22509    pub gpu_cores: [u8; 4],
22510    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22511    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22512    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22513    pub gpu_combined: [u8; 10],
22514    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
22515    pub temperature_board: i8,
22516    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
22517    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22518    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22519    pub temperature_core: [i8; 8],
22520}
22521impl ONBOARD_COMPUTER_STATUS_DATA {
22522    pub const ENCODED_LEN: usize = 238usize;
22523    pub const DEFAULT: Self = Self {
22524        time_usec: 0_u64,
22525        uptime: 0_u32,
22526        ram_usage: 0_u32,
22527        ram_total: 0_u32,
22528        storage_type: [0_u32; 4usize],
22529        storage_usage: [0_u32; 4usize],
22530        storage_total: [0_u32; 4usize],
22531        link_type: [0_u32; 6usize],
22532        link_tx_rate: [0_u32; 6usize],
22533        link_rx_rate: [0_u32; 6usize],
22534        link_tx_max: [0_u32; 6usize],
22535        link_rx_max: [0_u32; 6usize],
22536        fan_speed: [0_i16; 4usize],
22537        mavtype: 0_u8,
22538        cpu_cores: [0_u8; 8usize],
22539        cpu_combined: [0_u8; 10usize],
22540        gpu_cores: [0_u8; 4usize],
22541        gpu_combined: [0_u8; 10usize],
22542        temperature_board: 0_i8,
22543        temperature_core: [0_i8; 8usize],
22544    };
22545    #[cfg(feature = "arbitrary")]
22546    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22547        use arbitrary::{Arbitrary, Unstructured};
22548        let mut buf = [0u8; 1024];
22549        rng.fill_bytes(&mut buf);
22550        let mut unstructured = Unstructured::new(&buf);
22551        Self::arbitrary(&mut unstructured).unwrap_or_default()
22552    }
22553}
22554impl Default for ONBOARD_COMPUTER_STATUS_DATA {
22555    fn default() -> Self {
22556        Self::DEFAULT.clone()
22557    }
22558}
22559impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
22560    type Message = MavMessage;
22561    const ID: u32 = 390u32;
22562    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
22563    const EXTRA_CRC: u8 = 156u8;
22564    const ENCODED_LEN: usize = 238usize;
22565    fn deser(
22566        _version: MavlinkVersion,
22567        __input: &[u8],
22568    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22569        let avail_len = __input.len();
22570        let mut payload_buf = [0; Self::ENCODED_LEN];
22571        let mut buf = if avail_len < Self::ENCODED_LEN {
22572            payload_buf[0..avail_len].copy_from_slice(__input);
22573            Bytes::new(&payload_buf)
22574        } else {
22575            Bytes::new(__input)
22576        };
22577        let mut __struct = Self::default();
22578        __struct.time_usec = buf.get_u64_le()?;
22579        __struct.uptime = buf.get_u32_le()?;
22580        __struct.ram_usage = buf.get_u32_le()?;
22581        __struct.ram_total = buf.get_u32_le()?;
22582        for v in &mut __struct.storage_type {
22583            let val = buf.get_u32_le()?;
22584            *v = val;
22585        }
22586        for v in &mut __struct.storage_usage {
22587            let val = buf.get_u32_le()?;
22588            *v = val;
22589        }
22590        for v in &mut __struct.storage_total {
22591            let val = buf.get_u32_le()?;
22592            *v = val;
22593        }
22594        for v in &mut __struct.link_type {
22595            let val = buf.get_u32_le()?;
22596            *v = val;
22597        }
22598        for v in &mut __struct.link_tx_rate {
22599            let val = buf.get_u32_le()?;
22600            *v = val;
22601        }
22602        for v in &mut __struct.link_rx_rate {
22603            let val = buf.get_u32_le()?;
22604            *v = val;
22605        }
22606        for v in &mut __struct.link_tx_max {
22607            let val = buf.get_u32_le()?;
22608            *v = val;
22609        }
22610        for v in &mut __struct.link_rx_max {
22611            let val = buf.get_u32_le()?;
22612            *v = val;
22613        }
22614        for v in &mut __struct.fan_speed {
22615            let val = buf.get_i16_le()?;
22616            *v = val;
22617        }
22618        __struct.mavtype = buf.get_u8()?;
22619        for v in &mut __struct.cpu_cores {
22620            let val = buf.get_u8()?;
22621            *v = val;
22622        }
22623        for v in &mut __struct.cpu_combined {
22624            let val = buf.get_u8()?;
22625            *v = val;
22626        }
22627        for v in &mut __struct.gpu_cores {
22628            let val = buf.get_u8()?;
22629            *v = val;
22630        }
22631        for v in &mut __struct.gpu_combined {
22632            let val = buf.get_u8()?;
22633            *v = val;
22634        }
22635        __struct.temperature_board = buf.get_i8()?;
22636        for v in &mut __struct.temperature_core {
22637            let val = buf.get_i8()?;
22638            *v = val;
22639        }
22640        Ok(__struct)
22641    }
22642    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22643        let mut __tmp = BytesMut::new(bytes);
22644        #[allow(clippy::absurd_extreme_comparisons)]
22645        #[allow(unused_comparisons)]
22646        if __tmp.remaining() < Self::ENCODED_LEN {
22647            panic!(
22648                "buffer is too small (need {} bytes, but got {})",
22649                Self::ENCODED_LEN,
22650                __tmp.remaining(),
22651            )
22652        }
22653        __tmp.put_u64_le(self.time_usec);
22654        __tmp.put_u32_le(self.uptime);
22655        __tmp.put_u32_le(self.ram_usage);
22656        __tmp.put_u32_le(self.ram_total);
22657        for val in &self.storage_type {
22658            __tmp.put_u32_le(*val);
22659        }
22660        for val in &self.storage_usage {
22661            __tmp.put_u32_le(*val);
22662        }
22663        for val in &self.storage_total {
22664            __tmp.put_u32_le(*val);
22665        }
22666        for val in &self.link_type {
22667            __tmp.put_u32_le(*val);
22668        }
22669        for val in &self.link_tx_rate {
22670            __tmp.put_u32_le(*val);
22671        }
22672        for val in &self.link_rx_rate {
22673            __tmp.put_u32_le(*val);
22674        }
22675        for val in &self.link_tx_max {
22676            __tmp.put_u32_le(*val);
22677        }
22678        for val in &self.link_rx_max {
22679            __tmp.put_u32_le(*val);
22680        }
22681        for val in &self.fan_speed {
22682            __tmp.put_i16_le(*val);
22683        }
22684        __tmp.put_u8(self.mavtype);
22685        for val in &self.cpu_cores {
22686            __tmp.put_u8(*val);
22687        }
22688        for val in &self.cpu_combined {
22689            __tmp.put_u8(*val);
22690        }
22691        for val in &self.gpu_cores {
22692            __tmp.put_u8(*val);
22693        }
22694        for val in &self.gpu_combined {
22695            __tmp.put_u8(*val);
22696        }
22697        __tmp.put_i8(self.temperature_board);
22698        for val in &self.temperature_core {
22699            __tmp.put_i8(*val);
22700        }
22701        if matches!(version, MavlinkVersion::V2) {
22702            let len = __tmp.len();
22703            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22704        } else {
22705            __tmp.len()
22706        }
22707    }
22708}
22709#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
22710#[doc = ""]
22711#[doc = "ID: 12918"]
22712#[derive(Debug, Clone, PartialEq)]
22713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22715#[cfg_attr(feature = "ts", derive(TS))]
22716#[cfg_attr(feature = "ts", ts(export))]
22717pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
22718    #[doc = "Status level indicating if arming is allowed."]
22719    pub status: MavOdidArmStatus,
22720    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
22721    #[cfg_attr(feature = "ts", ts(type = "string"))]
22722    pub error: CharArray<50>,
22723}
22724impl OPEN_DRONE_ID_ARM_STATUS_DATA {
22725    pub const ENCODED_LEN: usize = 51usize;
22726    pub const DEFAULT: Self = Self {
22727        status: MavOdidArmStatus::DEFAULT,
22728        error: CharArray::new([0_u8; 50usize]),
22729    };
22730    #[cfg(feature = "arbitrary")]
22731    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22732        use arbitrary::{Arbitrary, Unstructured};
22733        let mut buf = [0u8; 1024];
22734        rng.fill_bytes(&mut buf);
22735        let mut unstructured = Unstructured::new(&buf);
22736        Self::arbitrary(&mut unstructured).unwrap_or_default()
22737    }
22738}
22739impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
22740    fn default() -> Self {
22741        Self::DEFAULT.clone()
22742    }
22743}
22744impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
22745    type Message = MavMessage;
22746    const ID: u32 = 12918u32;
22747    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
22748    const EXTRA_CRC: u8 = 139u8;
22749    const ENCODED_LEN: usize = 51usize;
22750    fn deser(
22751        _version: MavlinkVersion,
22752        __input: &[u8],
22753    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22754        let avail_len = __input.len();
22755        let mut payload_buf = [0; Self::ENCODED_LEN];
22756        let mut buf = if avail_len < Self::ENCODED_LEN {
22757            payload_buf[0..avail_len].copy_from_slice(__input);
22758            Bytes::new(&payload_buf)
22759        } else {
22760            Bytes::new(__input)
22761        };
22762        let mut __struct = Self::default();
22763        let tmp = buf.get_u8()?;
22764        __struct.status =
22765            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22766                enum_type: "MavOdidArmStatus",
22767                value: tmp as u64,
22768            })?;
22769        let mut tmp = [0_u8; 50usize];
22770        for v in &mut tmp {
22771            *v = buf.get_u8()?;
22772        }
22773        __struct.error = CharArray::new(tmp);
22774        Ok(__struct)
22775    }
22776    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22777        let mut __tmp = BytesMut::new(bytes);
22778        #[allow(clippy::absurd_extreme_comparisons)]
22779        #[allow(unused_comparisons)]
22780        if __tmp.remaining() < Self::ENCODED_LEN {
22781            panic!(
22782                "buffer is too small (need {} bytes, but got {})",
22783                Self::ENCODED_LEN,
22784                __tmp.remaining(),
22785            )
22786        }
22787        __tmp.put_u8(self.status as u8);
22788        for val in &self.error {
22789            __tmp.put_u8(*val);
22790        }
22791        if matches!(version, MavlinkVersion::V2) {
22792            let len = __tmp.len();
22793            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22794        } else {
22795            __tmp.len()
22796        }
22797    }
22798}
22799#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22800#[doc = ""]
22801#[doc = "ID: 12902"]
22802#[derive(Debug, Clone, PartialEq)]
22803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22805#[cfg_attr(feature = "ts", derive(TS))]
22806#[cfg_attr(feature = "ts", ts(export))]
22807pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22808    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22809    pub timestamp: u32,
22810    #[doc = "System ID (0 for broadcast)."]
22811    pub target_system: u8,
22812    #[doc = "Component ID (0 for broadcast)."]
22813    pub target_component: u8,
22814    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22815    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22816    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22817    pub id_or_mac: [u8; 20],
22818    #[doc = "Indicates the type of authentication."]
22819    pub authentication_type: MavOdidAuthType,
22820    #[doc = "Allowed range is 0 - 15."]
22821    pub data_page: u8,
22822    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22823    pub last_page_index: u8,
22824    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22825    pub length: u8,
22826    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22827    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22828    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22829    pub authentication_data: [u8; 23],
22830}
22831impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22832    pub const ENCODED_LEN: usize = 53usize;
22833    pub const DEFAULT: Self = Self {
22834        timestamp: 0_u32,
22835        target_system: 0_u8,
22836        target_component: 0_u8,
22837        id_or_mac: [0_u8; 20usize],
22838        authentication_type: MavOdidAuthType::DEFAULT,
22839        data_page: 0_u8,
22840        last_page_index: 0_u8,
22841        length: 0_u8,
22842        authentication_data: [0_u8; 23usize],
22843    };
22844    #[cfg(feature = "arbitrary")]
22845    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22846        use arbitrary::{Arbitrary, Unstructured};
22847        let mut buf = [0u8; 1024];
22848        rng.fill_bytes(&mut buf);
22849        let mut unstructured = Unstructured::new(&buf);
22850        Self::arbitrary(&mut unstructured).unwrap_or_default()
22851    }
22852}
22853impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22854    fn default() -> Self {
22855        Self::DEFAULT.clone()
22856    }
22857}
22858impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22859    type Message = MavMessage;
22860    const ID: u32 = 12902u32;
22861    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22862    const EXTRA_CRC: u8 = 140u8;
22863    const ENCODED_LEN: usize = 53usize;
22864    fn deser(
22865        _version: MavlinkVersion,
22866        __input: &[u8],
22867    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22868        let avail_len = __input.len();
22869        let mut payload_buf = [0; Self::ENCODED_LEN];
22870        let mut buf = if avail_len < Self::ENCODED_LEN {
22871            payload_buf[0..avail_len].copy_from_slice(__input);
22872            Bytes::new(&payload_buf)
22873        } else {
22874            Bytes::new(__input)
22875        };
22876        let mut __struct = Self::default();
22877        __struct.timestamp = buf.get_u32_le()?;
22878        __struct.target_system = buf.get_u8()?;
22879        __struct.target_component = buf.get_u8()?;
22880        for v in &mut __struct.id_or_mac {
22881            let val = buf.get_u8()?;
22882            *v = val;
22883        }
22884        let tmp = buf.get_u8()?;
22885        __struct.authentication_type =
22886            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22887                enum_type: "MavOdidAuthType",
22888                value: tmp as u64,
22889            })?;
22890        __struct.data_page = buf.get_u8()?;
22891        __struct.last_page_index = buf.get_u8()?;
22892        __struct.length = buf.get_u8()?;
22893        for v in &mut __struct.authentication_data {
22894            let val = buf.get_u8()?;
22895            *v = val;
22896        }
22897        Ok(__struct)
22898    }
22899    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22900        let mut __tmp = BytesMut::new(bytes);
22901        #[allow(clippy::absurd_extreme_comparisons)]
22902        #[allow(unused_comparisons)]
22903        if __tmp.remaining() < Self::ENCODED_LEN {
22904            panic!(
22905                "buffer is too small (need {} bytes, but got {})",
22906                Self::ENCODED_LEN,
22907                __tmp.remaining(),
22908            )
22909        }
22910        __tmp.put_u32_le(self.timestamp);
22911        __tmp.put_u8(self.target_system);
22912        __tmp.put_u8(self.target_component);
22913        for val in &self.id_or_mac {
22914            __tmp.put_u8(*val);
22915        }
22916        __tmp.put_u8(self.authentication_type as u8);
22917        __tmp.put_u8(self.data_page);
22918        __tmp.put_u8(self.last_page_index);
22919        __tmp.put_u8(self.length);
22920        for val in &self.authentication_data {
22921            __tmp.put_u8(*val);
22922        }
22923        if matches!(version, MavlinkVersion::V2) {
22924            let len = __tmp.len();
22925            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22926        } else {
22927            __tmp.len()
22928        }
22929    }
22930}
22931#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22932#[doc = ""]
22933#[doc = "ID: 12900"]
22934#[derive(Debug, Clone, PartialEq)]
22935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22936#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22937#[cfg_attr(feature = "ts", derive(TS))]
22938#[cfg_attr(feature = "ts", ts(export))]
22939pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22940    #[doc = "System ID (0 for broadcast)."]
22941    pub target_system: u8,
22942    #[doc = "Component ID (0 for broadcast)."]
22943    pub target_component: u8,
22944    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22945    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22946    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22947    pub id_or_mac: [u8; 20],
22948    #[doc = "Indicates the format for the uas_id field of this message."]
22949    pub id_type: MavOdidIdType,
22950    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22951    pub ua_type: MavOdidUaType,
22952    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22953    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22954    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22955    pub uas_id: [u8; 20],
22956}
22957impl OPEN_DRONE_ID_BASIC_ID_DATA {
22958    pub const ENCODED_LEN: usize = 44usize;
22959    pub const DEFAULT: Self = Self {
22960        target_system: 0_u8,
22961        target_component: 0_u8,
22962        id_or_mac: [0_u8; 20usize],
22963        id_type: MavOdidIdType::DEFAULT,
22964        ua_type: MavOdidUaType::DEFAULT,
22965        uas_id: [0_u8; 20usize],
22966    };
22967    #[cfg(feature = "arbitrary")]
22968    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22969        use arbitrary::{Arbitrary, Unstructured};
22970        let mut buf = [0u8; 1024];
22971        rng.fill_bytes(&mut buf);
22972        let mut unstructured = Unstructured::new(&buf);
22973        Self::arbitrary(&mut unstructured).unwrap_or_default()
22974    }
22975}
22976impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22977    fn default() -> Self {
22978        Self::DEFAULT.clone()
22979    }
22980}
22981impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22982    type Message = MavMessage;
22983    const ID: u32 = 12900u32;
22984    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22985    const EXTRA_CRC: u8 = 114u8;
22986    const ENCODED_LEN: usize = 44usize;
22987    fn deser(
22988        _version: MavlinkVersion,
22989        __input: &[u8],
22990    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22991        let avail_len = __input.len();
22992        let mut payload_buf = [0; Self::ENCODED_LEN];
22993        let mut buf = if avail_len < Self::ENCODED_LEN {
22994            payload_buf[0..avail_len].copy_from_slice(__input);
22995            Bytes::new(&payload_buf)
22996        } else {
22997            Bytes::new(__input)
22998        };
22999        let mut __struct = Self::default();
23000        __struct.target_system = buf.get_u8()?;
23001        __struct.target_component = buf.get_u8()?;
23002        for v in &mut __struct.id_or_mac {
23003            let val = buf.get_u8()?;
23004            *v = val;
23005        }
23006        let tmp = buf.get_u8()?;
23007        __struct.id_type =
23008            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23009                enum_type: "MavOdidIdType",
23010                value: tmp as u64,
23011            })?;
23012        let tmp = buf.get_u8()?;
23013        __struct.ua_type =
23014            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23015                enum_type: "MavOdidUaType",
23016                value: tmp as u64,
23017            })?;
23018        for v in &mut __struct.uas_id {
23019            let val = buf.get_u8()?;
23020            *v = val;
23021        }
23022        Ok(__struct)
23023    }
23024    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23025        let mut __tmp = BytesMut::new(bytes);
23026        #[allow(clippy::absurd_extreme_comparisons)]
23027        #[allow(unused_comparisons)]
23028        if __tmp.remaining() < Self::ENCODED_LEN {
23029            panic!(
23030                "buffer is too small (need {} bytes, but got {})",
23031                Self::ENCODED_LEN,
23032                __tmp.remaining(),
23033            )
23034        }
23035        __tmp.put_u8(self.target_system);
23036        __tmp.put_u8(self.target_component);
23037        for val in &self.id_or_mac {
23038            __tmp.put_u8(*val);
23039        }
23040        __tmp.put_u8(self.id_type as u8);
23041        __tmp.put_u8(self.ua_type as u8);
23042        for val in &self.uas_id {
23043            __tmp.put_u8(*val);
23044        }
23045        if matches!(version, MavlinkVersion::V2) {
23046            let len = __tmp.len();
23047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23048        } else {
23049            __tmp.len()
23050        }
23051    }
23052}
23053#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
23054#[doc = ""]
23055#[doc = "ID: 12901"]
23056#[derive(Debug, Clone, PartialEq)]
23057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23059#[cfg_attr(feature = "ts", derive(TS))]
23060#[cfg_attr(feature = "ts", ts(export))]
23061pub struct OPEN_DRONE_ID_LOCATION_DATA {
23062    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
23063    pub latitude: i32,
23064    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
23065    pub longitude: i32,
23066    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
23067    pub altitude_barometric: f32,
23068    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
23069    pub altitude_geodetic: f32,
23070    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
23071    pub height: f32,
23072    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
23073    pub timestamp: f32,
23074    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
23075    pub direction: u16,
23076    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
23077    pub speed_horizontal: u16,
23078    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
23079    pub speed_vertical: i16,
23080    #[doc = "System ID (0 for broadcast)."]
23081    pub target_system: u8,
23082    #[doc = "Component ID (0 for broadcast)."]
23083    pub target_component: u8,
23084    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23085    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23086    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23087    pub id_or_mac: [u8; 20],
23088    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
23089    pub status: MavOdidStatus,
23090    #[doc = "Indicates the reference point for the height field."]
23091    pub height_reference: MavOdidHeightRef,
23092    #[doc = "The accuracy of the horizontal position."]
23093    pub horizontal_accuracy: MavOdidHorAcc,
23094    #[doc = "The accuracy of the vertical position."]
23095    pub vertical_accuracy: MavOdidVerAcc,
23096    #[doc = "The accuracy of the barometric altitude."]
23097    pub barometer_accuracy: MavOdidVerAcc,
23098    #[doc = "The accuracy of the horizontal and vertical speed."]
23099    pub speed_accuracy: MavOdidSpeedAcc,
23100    #[doc = "The accuracy of the timestamps."]
23101    pub timestamp_accuracy: MavOdidTimeAcc,
23102}
23103impl OPEN_DRONE_ID_LOCATION_DATA {
23104    pub const ENCODED_LEN: usize = 59usize;
23105    pub const DEFAULT: Self = Self {
23106        latitude: 0_i32,
23107        longitude: 0_i32,
23108        altitude_barometric: 0.0_f32,
23109        altitude_geodetic: 0.0_f32,
23110        height: 0.0_f32,
23111        timestamp: 0.0_f32,
23112        direction: 0_u16,
23113        speed_horizontal: 0_u16,
23114        speed_vertical: 0_i16,
23115        target_system: 0_u8,
23116        target_component: 0_u8,
23117        id_or_mac: [0_u8; 20usize],
23118        status: MavOdidStatus::DEFAULT,
23119        height_reference: MavOdidHeightRef::DEFAULT,
23120        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
23121        vertical_accuracy: MavOdidVerAcc::DEFAULT,
23122        barometer_accuracy: MavOdidVerAcc::DEFAULT,
23123        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
23124        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
23125    };
23126    #[cfg(feature = "arbitrary")]
23127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23128        use arbitrary::{Arbitrary, Unstructured};
23129        let mut buf = [0u8; 1024];
23130        rng.fill_bytes(&mut buf);
23131        let mut unstructured = Unstructured::new(&buf);
23132        Self::arbitrary(&mut unstructured).unwrap_or_default()
23133    }
23134}
23135impl Default for OPEN_DRONE_ID_LOCATION_DATA {
23136    fn default() -> Self {
23137        Self::DEFAULT.clone()
23138    }
23139}
23140impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
23141    type Message = MavMessage;
23142    const ID: u32 = 12901u32;
23143    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
23144    const EXTRA_CRC: u8 = 254u8;
23145    const ENCODED_LEN: usize = 59usize;
23146    fn deser(
23147        _version: MavlinkVersion,
23148        __input: &[u8],
23149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23150        let avail_len = __input.len();
23151        let mut payload_buf = [0; Self::ENCODED_LEN];
23152        let mut buf = if avail_len < Self::ENCODED_LEN {
23153            payload_buf[0..avail_len].copy_from_slice(__input);
23154            Bytes::new(&payload_buf)
23155        } else {
23156            Bytes::new(__input)
23157        };
23158        let mut __struct = Self::default();
23159        __struct.latitude = buf.get_i32_le()?;
23160        __struct.longitude = buf.get_i32_le()?;
23161        __struct.altitude_barometric = buf.get_f32_le()?;
23162        __struct.altitude_geodetic = buf.get_f32_le()?;
23163        __struct.height = buf.get_f32_le()?;
23164        __struct.timestamp = buf.get_f32_le()?;
23165        __struct.direction = buf.get_u16_le()?;
23166        __struct.speed_horizontal = buf.get_u16_le()?;
23167        __struct.speed_vertical = buf.get_i16_le()?;
23168        __struct.target_system = buf.get_u8()?;
23169        __struct.target_component = buf.get_u8()?;
23170        for v in &mut __struct.id_or_mac {
23171            let val = buf.get_u8()?;
23172            *v = val;
23173        }
23174        let tmp = buf.get_u8()?;
23175        __struct.status =
23176            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23177                enum_type: "MavOdidStatus",
23178                value: tmp as u64,
23179            })?;
23180        let tmp = buf.get_u8()?;
23181        __struct.height_reference =
23182            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23183                enum_type: "MavOdidHeightRef",
23184                value: tmp as u64,
23185            })?;
23186        let tmp = buf.get_u8()?;
23187        __struct.horizontal_accuracy =
23188            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23189                enum_type: "MavOdidHorAcc",
23190                value: tmp as u64,
23191            })?;
23192        let tmp = buf.get_u8()?;
23193        __struct.vertical_accuracy =
23194            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23195                enum_type: "MavOdidVerAcc",
23196                value: tmp as u64,
23197            })?;
23198        let tmp = buf.get_u8()?;
23199        __struct.barometer_accuracy =
23200            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23201                enum_type: "MavOdidVerAcc",
23202                value: tmp as u64,
23203            })?;
23204        let tmp = buf.get_u8()?;
23205        __struct.speed_accuracy =
23206            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23207                enum_type: "MavOdidSpeedAcc",
23208                value: tmp as u64,
23209            })?;
23210        let tmp = buf.get_u8()?;
23211        __struct.timestamp_accuracy =
23212            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23213                enum_type: "MavOdidTimeAcc",
23214                value: tmp as u64,
23215            })?;
23216        Ok(__struct)
23217    }
23218    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23219        let mut __tmp = BytesMut::new(bytes);
23220        #[allow(clippy::absurd_extreme_comparisons)]
23221        #[allow(unused_comparisons)]
23222        if __tmp.remaining() < Self::ENCODED_LEN {
23223            panic!(
23224                "buffer is too small (need {} bytes, but got {})",
23225                Self::ENCODED_LEN,
23226                __tmp.remaining(),
23227            )
23228        }
23229        __tmp.put_i32_le(self.latitude);
23230        __tmp.put_i32_le(self.longitude);
23231        __tmp.put_f32_le(self.altitude_barometric);
23232        __tmp.put_f32_le(self.altitude_geodetic);
23233        __tmp.put_f32_le(self.height);
23234        __tmp.put_f32_le(self.timestamp);
23235        __tmp.put_u16_le(self.direction);
23236        __tmp.put_u16_le(self.speed_horizontal);
23237        __tmp.put_i16_le(self.speed_vertical);
23238        __tmp.put_u8(self.target_system);
23239        __tmp.put_u8(self.target_component);
23240        for val in &self.id_or_mac {
23241            __tmp.put_u8(*val);
23242        }
23243        __tmp.put_u8(self.status as u8);
23244        __tmp.put_u8(self.height_reference as u8);
23245        __tmp.put_u8(self.horizontal_accuracy as u8);
23246        __tmp.put_u8(self.vertical_accuracy as u8);
23247        __tmp.put_u8(self.barometer_accuracy as u8);
23248        __tmp.put_u8(self.speed_accuracy as u8);
23249        __tmp.put_u8(self.timestamp_accuracy as u8);
23250        if matches!(version, MavlinkVersion::V2) {
23251            let len = __tmp.len();
23252            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23253        } else {
23254            __tmp.len()
23255        }
23256    }
23257}
23258#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
23259#[doc = ""]
23260#[doc = "ID: 12915"]
23261#[derive(Debug, Clone, PartialEq)]
23262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23264#[cfg_attr(feature = "ts", derive(TS))]
23265#[cfg_attr(feature = "ts", ts(export))]
23266pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23267    #[doc = "System ID (0 for broadcast)."]
23268    pub target_system: u8,
23269    #[doc = "Component ID (0 for broadcast)."]
23270    pub target_component: u8,
23271    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23272    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23273    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23274    pub id_or_mac: [u8; 20],
23275    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
23276    pub single_message_size: u8,
23277    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
23278    pub msg_pack_size: u8,
23279    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
23280    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23281    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23282    pub messages: [u8; 225],
23283}
23284impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23285    pub const ENCODED_LEN: usize = 249usize;
23286    pub const DEFAULT: Self = Self {
23287        target_system: 0_u8,
23288        target_component: 0_u8,
23289        id_or_mac: [0_u8; 20usize],
23290        single_message_size: 0_u8,
23291        msg_pack_size: 0_u8,
23292        messages: [0_u8; 225usize],
23293    };
23294    #[cfg(feature = "arbitrary")]
23295    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23296        use arbitrary::{Arbitrary, Unstructured};
23297        let mut buf = [0u8; 1024];
23298        rng.fill_bytes(&mut buf);
23299        let mut unstructured = Unstructured::new(&buf);
23300        Self::arbitrary(&mut unstructured).unwrap_or_default()
23301    }
23302}
23303impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23304    fn default() -> Self {
23305        Self::DEFAULT.clone()
23306    }
23307}
23308impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23309    type Message = MavMessage;
23310    const ID: u32 = 12915u32;
23311    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
23312    const EXTRA_CRC: u8 = 94u8;
23313    const ENCODED_LEN: usize = 249usize;
23314    fn deser(
23315        _version: MavlinkVersion,
23316        __input: &[u8],
23317    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23318        let avail_len = __input.len();
23319        let mut payload_buf = [0; Self::ENCODED_LEN];
23320        let mut buf = if avail_len < Self::ENCODED_LEN {
23321            payload_buf[0..avail_len].copy_from_slice(__input);
23322            Bytes::new(&payload_buf)
23323        } else {
23324            Bytes::new(__input)
23325        };
23326        let mut __struct = Self::default();
23327        __struct.target_system = buf.get_u8()?;
23328        __struct.target_component = buf.get_u8()?;
23329        for v in &mut __struct.id_or_mac {
23330            let val = buf.get_u8()?;
23331            *v = val;
23332        }
23333        __struct.single_message_size = buf.get_u8()?;
23334        __struct.msg_pack_size = buf.get_u8()?;
23335        for v in &mut __struct.messages {
23336            let val = buf.get_u8()?;
23337            *v = val;
23338        }
23339        Ok(__struct)
23340    }
23341    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23342        let mut __tmp = BytesMut::new(bytes);
23343        #[allow(clippy::absurd_extreme_comparisons)]
23344        #[allow(unused_comparisons)]
23345        if __tmp.remaining() < Self::ENCODED_LEN {
23346            panic!(
23347                "buffer is too small (need {} bytes, but got {})",
23348                Self::ENCODED_LEN,
23349                __tmp.remaining(),
23350            )
23351        }
23352        __tmp.put_u8(self.target_system);
23353        __tmp.put_u8(self.target_component);
23354        for val in &self.id_or_mac {
23355            __tmp.put_u8(*val);
23356        }
23357        __tmp.put_u8(self.single_message_size);
23358        __tmp.put_u8(self.msg_pack_size);
23359        for val in &self.messages {
23360            __tmp.put_u8(*val);
23361        }
23362        if matches!(version, MavlinkVersion::V2) {
23363            let len = __tmp.len();
23364            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23365        } else {
23366            __tmp.len()
23367        }
23368    }
23369}
23370#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
23371#[doc = ""]
23372#[doc = "ID: 12905"]
23373#[derive(Debug, Clone, PartialEq)]
23374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23376#[cfg_attr(feature = "ts", derive(TS))]
23377#[cfg_attr(feature = "ts", ts(export))]
23378pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
23379    #[doc = "System ID (0 for broadcast)."]
23380    pub target_system: u8,
23381    #[doc = "Component ID (0 for broadcast)."]
23382    pub target_component: u8,
23383    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23384    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23385    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23386    pub id_or_mac: [u8; 20],
23387    #[doc = "Indicates the type of the operator_id field."]
23388    pub operator_id_type: MavOdidOperatorIdType,
23389    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23390    #[cfg_attr(feature = "ts", ts(type = "string"))]
23391    pub operator_id: CharArray<20>,
23392}
23393impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
23394    pub const ENCODED_LEN: usize = 43usize;
23395    pub const DEFAULT: Self = Self {
23396        target_system: 0_u8,
23397        target_component: 0_u8,
23398        id_or_mac: [0_u8; 20usize],
23399        operator_id_type: MavOdidOperatorIdType::DEFAULT,
23400        operator_id: CharArray::new([0_u8; 20usize]),
23401    };
23402    #[cfg(feature = "arbitrary")]
23403    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23404        use arbitrary::{Arbitrary, Unstructured};
23405        let mut buf = [0u8; 1024];
23406        rng.fill_bytes(&mut buf);
23407        let mut unstructured = Unstructured::new(&buf);
23408        Self::arbitrary(&mut unstructured).unwrap_or_default()
23409    }
23410}
23411impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23412    fn default() -> Self {
23413        Self::DEFAULT.clone()
23414    }
23415}
23416impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23417    type Message = MavMessage;
23418    const ID: u32 = 12905u32;
23419    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
23420    const EXTRA_CRC: u8 = 49u8;
23421    const ENCODED_LEN: usize = 43usize;
23422    fn deser(
23423        _version: MavlinkVersion,
23424        __input: &[u8],
23425    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23426        let avail_len = __input.len();
23427        let mut payload_buf = [0; Self::ENCODED_LEN];
23428        let mut buf = if avail_len < Self::ENCODED_LEN {
23429            payload_buf[0..avail_len].copy_from_slice(__input);
23430            Bytes::new(&payload_buf)
23431        } else {
23432            Bytes::new(__input)
23433        };
23434        let mut __struct = Self::default();
23435        __struct.target_system = buf.get_u8()?;
23436        __struct.target_component = buf.get_u8()?;
23437        for v in &mut __struct.id_or_mac {
23438            let val = buf.get_u8()?;
23439            *v = val;
23440        }
23441        let tmp = buf.get_u8()?;
23442        __struct.operator_id_type =
23443            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23444                enum_type: "MavOdidOperatorIdType",
23445                value: tmp as u64,
23446            })?;
23447        let mut tmp = [0_u8; 20usize];
23448        for v in &mut tmp {
23449            *v = buf.get_u8()?;
23450        }
23451        __struct.operator_id = CharArray::new(tmp);
23452        Ok(__struct)
23453    }
23454    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23455        let mut __tmp = BytesMut::new(bytes);
23456        #[allow(clippy::absurd_extreme_comparisons)]
23457        #[allow(unused_comparisons)]
23458        if __tmp.remaining() < Self::ENCODED_LEN {
23459            panic!(
23460                "buffer is too small (need {} bytes, but got {})",
23461                Self::ENCODED_LEN,
23462                __tmp.remaining(),
23463            )
23464        }
23465        __tmp.put_u8(self.target_system);
23466        __tmp.put_u8(self.target_component);
23467        for val in &self.id_or_mac {
23468            __tmp.put_u8(*val);
23469        }
23470        __tmp.put_u8(self.operator_id_type as u8);
23471        for val in &self.operator_id {
23472            __tmp.put_u8(*val);
23473        }
23474        if matches!(version, MavlinkVersion::V2) {
23475            let len = __tmp.len();
23476            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23477        } else {
23478            __tmp.len()
23479        }
23480    }
23481}
23482#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
23483#[doc = ""]
23484#[doc = "ID: 12903"]
23485#[derive(Debug, Clone, PartialEq)]
23486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23487#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23488#[cfg_attr(feature = "ts", derive(TS))]
23489#[cfg_attr(feature = "ts", ts(export))]
23490pub struct OPEN_DRONE_ID_SELF_ID_DATA {
23491    #[doc = "System ID (0 for broadcast)."]
23492    pub target_system: u8,
23493    #[doc = "Component ID (0 for broadcast)."]
23494    pub target_component: u8,
23495    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23496    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23497    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23498    pub id_or_mac: [u8; 20],
23499    #[doc = "Indicates the type of the description field."]
23500    pub description_type: MavOdidDescType,
23501    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23502    #[cfg_attr(feature = "ts", ts(type = "string"))]
23503    pub description: CharArray<23>,
23504}
23505impl OPEN_DRONE_ID_SELF_ID_DATA {
23506    pub const ENCODED_LEN: usize = 46usize;
23507    pub const DEFAULT: Self = Self {
23508        target_system: 0_u8,
23509        target_component: 0_u8,
23510        id_or_mac: [0_u8; 20usize],
23511        description_type: MavOdidDescType::DEFAULT,
23512        description: CharArray::new([0_u8; 23usize]),
23513    };
23514    #[cfg(feature = "arbitrary")]
23515    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23516        use arbitrary::{Arbitrary, Unstructured};
23517        let mut buf = [0u8; 1024];
23518        rng.fill_bytes(&mut buf);
23519        let mut unstructured = Unstructured::new(&buf);
23520        Self::arbitrary(&mut unstructured).unwrap_or_default()
23521    }
23522}
23523impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
23524    fn default() -> Self {
23525        Self::DEFAULT.clone()
23526    }
23527}
23528impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
23529    type Message = MavMessage;
23530    const ID: u32 = 12903u32;
23531    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
23532    const EXTRA_CRC: u8 = 249u8;
23533    const ENCODED_LEN: usize = 46usize;
23534    fn deser(
23535        _version: MavlinkVersion,
23536        __input: &[u8],
23537    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23538        let avail_len = __input.len();
23539        let mut payload_buf = [0; Self::ENCODED_LEN];
23540        let mut buf = if avail_len < Self::ENCODED_LEN {
23541            payload_buf[0..avail_len].copy_from_slice(__input);
23542            Bytes::new(&payload_buf)
23543        } else {
23544            Bytes::new(__input)
23545        };
23546        let mut __struct = Self::default();
23547        __struct.target_system = buf.get_u8()?;
23548        __struct.target_component = buf.get_u8()?;
23549        for v in &mut __struct.id_or_mac {
23550            let val = buf.get_u8()?;
23551            *v = val;
23552        }
23553        let tmp = buf.get_u8()?;
23554        __struct.description_type =
23555            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23556                enum_type: "MavOdidDescType",
23557                value: tmp as u64,
23558            })?;
23559        let mut tmp = [0_u8; 23usize];
23560        for v in &mut tmp {
23561            *v = buf.get_u8()?;
23562        }
23563        __struct.description = CharArray::new(tmp);
23564        Ok(__struct)
23565    }
23566    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23567        let mut __tmp = BytesMut::new(bytes);
23568        #[allow(clippy::absurd_extreme_comparisons)]
23569        #[allow(unused_comparisons)]
23570        if __tmp.remaining() < Self::ENCODED_LEN {
23571            panic!(
23572                "buffer is too small (need {} bytes, but got {})",
23573                Self::ENCODED_LEN,
23574                __tmp.remaining(),
23575            )
23576        }
23577        __tmp.put_u8(self.target_system);
23578        __tmp.put_u8(self.target_component);
23579        for val in &self.id_or_mac {
23580            __tmp.put_u8(*val);
23581        }
23582        __tmp.put_u8(self.description_type as u8);
23583        for val in &self.description {
23584            __tmp.put_u8(*val);
23585        }
23586        if matches!(version, MavlinkVersion::V2) {
23587            let len = __tmp.len();
23588            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23589        } else {
23590            __tmp.len()
23591        }
23592    }
23593}
23594#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
23595#[doc = ""]
23596#[doc = "ID: 12904"]
23597#[derive(Debug, Clone, PartialEq)]
23598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23600#[cfg_attr(feature = "ts", derive(TS))]
23601#[cfg_attr(feature = "ts", ts(export))]
23602pub struct OPEN_DRONE_ID_SYSTEM_DATA {
23603    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23604    pub operator_latitude: i32,
23605    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23606    pub operator_longitude: i32,
23607    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23608    pub area_ceiling: f32,
23609    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23610    pub area_floor: f32,
23611    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23612    pub operator_altitude_geo: f32,
23613    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23614    pub timestamp: u32,
23615    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
23616    pub area_count: u16,
23617    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
23618    pub area_radius: u16,
23619    #[doc = "System ID (0 for broadcast)."]
23620    pub target_system: u8,
23621    #[doc = "Component ID (0 for broadcast)."]
23622    pub target_component: u8,
23623    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23624    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23625    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23626    pub id_or_mac: [u8; 20],
23627    #[doc = "Specifies the operator location type."]
23628    pub operator_location_type: MavOdidOperatorLocationType,
23629    #[doc = "Specifies the classification type of the UA."]
23630    pub classification_type: MavOdidClassificationType,
23631    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
23632    pub category_eu: MavOdidCategoryEu,
23633    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
23634    pub class_eu: MavOdidClassEu,
23635}
23636impl OPEN_DRONE_ID_SYSTEM_DATA {
23637    pub const ENCODED_LEN: usize = 54usize;
23638    pub const DEFAULT: Self = Self {
23639        operator_latitude: 0_i32,
23640        operator_longitude: 0_i32,
23641        area_ceiling: 0.0_f32,
23642        area_floor: 0.0_f32,
23643        operator_altitude_geo: 0.0_f32,
23644        timestamp: 0_u32,
23645        area_count: 0_u16,
23646        area_radius: 0_u16,
23647        target_system: 0_u8,
23648        target_component: 0_u8,
23649        id_or_mac: [0_u8; 20usize],
23650        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
23651        classification_type: MavOdidClassificationType::DEFAULT,
23652        category_eu: MavOdidCategoryEu::DEFAULT,
23653        class_eu: MavOdidClassEu::DEFAULT,
23654    };
23655    #[cfg(feature = "arbitrary")]
23656    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23657        use arbitrary::{Arbitrary, Unstructured};
23658        let mut buf = [0u8; 1024];
23659        rng.fill_bytes(&mut buf);
23660        let mut unstructured = Unstructured::new(&buf);
23661        Self::arbitrary(&mut unstructured).unwrap_or_default()
23662    }
23663}
23664impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
23665    fn default() -> Self {
23666        Self::DEFAULT.clone()
23667    }
23668}
23669impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
23670    type Message = MavMessage;
23671    const ID: u32 = 12904u32;
23672    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
23673    const EXTRA_CRC: u8 = 77u8;
23674    const ENCODED_LEN: usize = 54usize;
23675    fn deser(
23676        _version: MavlinkVersion,
23677        __input: &[u8],
23678    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23679        let avail_len = __input.len();
23680        let mut payload_buf = [0; Self::ENCODED_LEN];
23681        let mut buf = if avail_len < Self::ENCODED_LEN {
23682            payload_buf[0..avail_len].copy_from_slice(__input);
23683            Bytes::new(&payload_buf)
23684        } else {
23685            Bytes::new(__input)
23686        };
23687        let mut __struct = Self::default();
23688        __struct.operator_latitude = buf.get_i32_le()?;
23689        __struct.operator_longitude = buf.get_i32_le()?;
23690        __struct.area_ceiling = buf.get_f32_le()?;
23691        __struct.area_floor = buf.get_f32_le()?;
23692        __struct.operator_altitude_geo = buf.get_f32_le()?;
23693        __struct.timestamp = buf.get_u32_le()?;
23694        __struct.area_count = buf.get_u16_le()?;
23695        __struct.area_radius = buf.get_u16_le()?;
23696        __struct.target_system = buf.get_u8()?;
23697        __struct.target_component = buf.get_u8()?;
23698        for v in &mut __struct.id_or_mac {
23699            let val = buf.get_u8()?;
23700            *v = val;
23701        }
23702        let tmp = buf.get_u8()?;
23703        __struct.operator_location_type =
23704            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23705                enum_type: "MavOdidOperatorLocationType",
23706                value: tmp as u64,
23707            })?;
23708        let tmp = buf.get_u8()?;
23709        __struct.classification_type =
23710            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23711                enum_type: "MavOdidClassificationType",
23712                value: tmp as u64,
23713            })?;
23714        let tmp = buf.get_u8()?;
23715        __struct.category_eu =
23716            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23717                enum_type: "MavOdidCategoryEu",
23718                value: tmp as u64,
23719            })?;
23720        let tmp = buf.get_u8()?;
23721        __struct.class_eu =
23722            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23723                enum_type: "MavOdidClassEu",
23724                value: tmp as u64,
23725            })?;
23726        Ok(__struct)
23727    }
23728    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23729        let mut __tmp = BytesMut::new(bytes);
23730        #[allow(clippy::absurd_extreme_comparisons)]
23731        #[allow(unused_comparisons)]
23732        if __tmp.remaining() < Self::ENCODED_LEN {
23733            panic!(
23734                "buffer is too small (need {} bytes, but got {})",
23735                Self::ENCODED_LEN,
23736                __tmp.remaining(),
23737            )
23738        }
23739        __tmp.put_i32_le(self.operator_latitude);
23740        __tmp.put_i32_le(self.operator_longitude);
23741        __tmp.put_f32_le(self.area_ceiling);
23742        __tmp.put_f32_le(self.area_floor);
23743        __tmp.put_f32_le(self.operator_altitude_geo);
23744        __tmp.put_u32_le(self.timestamp);
23745        __tmp.put_u16_le(self.area_count);
23746        __tmp.put_u16_le(self.area_radius);
23747        __tmp.put_u8(self.target_system);
23748        __tmp.put_u8(self.target_component);
23749        for val in &self.id_or_mac {
23750            __tmp.put_u8(*val);
23751        }
23752        __tmp.put_u8(self.operator_location_type as u8);
23753        __tmp.put_u8(self.classification_type as u8);
23754        __tmp.put_u8(self.category_eu as u8);
23755        __tmp.put_u8(self.class_eu as u8);
23756        if matches!(version, MavlinkVersion::V2) {
23757            let len = __tmp.len();
23758            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23759        } else {
23760            __tmp.len()
23761        }
23762    }
23763}
23764#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
23765#[doc = ""]
23766#[doc = "ID: 12919"]
23767#[derive(Debug, Clone, PartialEq)]
23768#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23770#[cfg_attr(feature = "ts", derive(TS))]
23771#[cfg_attr(feature = "ts", ts(export))]
23772pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23773    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23774    pub operator_latitude: i32,
23775    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23776    pub operator_longitude: i32,
23777    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23778    pub operator_altitude_geo: f32,
23779    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23780    pub timestamp: u32,
23781    #[doc = "System ID (0 for broadcast)."]
23782    pub target_system: u8,
23783    #[doc = "Component ID (0 for broadcast)."]
23784    pub target_component: u8,
23785}
23786impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23787    pub const ENCODED_LEN: usize = 18usize;
23788    pub const DEFAULT: Self = Self {
23789        operator_latitude: 0_i32,
23790        operator_longitude: 0_i32,
23791        operator_altitude_geo: 0.0_f32,
23792        timestamp: 0_u32,
23793        target_system: 0_u8,
23794        target_component: 0_u8,
23795    };
23796    #[cfg(feature = "arbitrary")]
23797    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23798        use arbitrary::{Arbitrary, Unstructured};
23799        let mut buf = [0u8; 1024];
23800        rng.fill_bytes(&mut buf);
23801        let mut unstructured = Unstructured::new(&buf);
23802        Self::arbitrary(&mut unstructured).unwrap_or_default()
23803    }
23804}
23805impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23806    fn default() -> Self {
23807        Self::DEFAULT.clone()
23808    }
23809}
23810impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23811    type Message = MavMessage;
23812    const ID: u32 = 12919u32;
23813    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23814    const EXTRA_CRC: u8 = 7u8;
23815    const ENCODED_LEN: usize = 18usize;
23816    fn deser(
23817        _version: MavlinkVersion,
23818        __input: &[u8],
23819    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23820        let avail_len = __input.len();
23821        let mut payload_buf = [0; Self::ENCODED_LEN];
23822        let mut buf = if avail_len < Self::ENCODED_LEN {
23823            payload_buf[0..avail_len].copy_from_slice(__input);
23824            Bytes::new(&payload_buf)
23825        } else {
23826            Bytes::new(__input)
23827        };
23828        let mut __struct = Self::default();
23829        __struct.operator_latitude = buf.get_i32_le()?;
23830        __struct.operator_longitude = buf.get_i32_le()?;
23831        __struct.operator_altitude_geo = buf.get_f32_le()?;
23832        __struct.timestamp = buf.get_u32_le()?;
23833        __struct.target_system = buf.get_u8()?;
23834        __struct.target_component = buf.get_u8()?;
23835        Ok(__struct)
23836    }
23837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23838        let mut __tmp = BytesMut::new(bytes);
23839        #[allow(clippy::absurd_extreme_comparisons)]
23840        #[allow(unused_comparisons)]
23841        if __tmp.remaining() < Self::ENCODED_LEN {
23842            panic!(
23843                "buffer is too small (need {} bytes, but got {})",
23844                Self::ENCODED_LEN,
23845                __tmp.remaining(),
23846            )
23847        }
23848        __tmp.put_i32_le(self.operator_latitude);
23849        __tmp.put_i32_le(self.operator_longitude);
23850        __tmp.put_f32_le(self.operator_altitude_geo);
23851        __tmp.put_u32_le(self.timestamp);
23852        __tmp.put_u8(self.target_system);
23853        __tmp.put_u8(self.target_component);
23854        if matches!(version, MavlinkVersion::V2) {
23855            let len = __tmp.len();
23856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23857        } else {
23858            __tmp.len()
23859        }
23860    }
23861}
23862#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23863#[doc = ""]
23864#[doc = "ID: 100"]
23865#[derive(Debug, Clone, PartialEq)]
23866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23868#[cfg_attr(feature = "ts", derive(TS))]
23869#[cfg_attr(feature = "ts", ts(export))]
23870pub struct OPTICAL_FLOW_DATA {
23871    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23872    pub time_usec: u64,
23873    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23874    pub flow_comp_m_x: f32,
23875    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23876    pub flow_comp_m_y: f32,
23877    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23878    pub ground_distance: f32,
23879    #[doc = "Flow in x-sensor direction"]
23880    pub flow_x: i16,
23881    #[doc = "Flow in y-sensor direction"]
23882    pub flow_y: i16,
23883    #[doc = "Sensor ID"]
23884    pub sensor_id: u8,
23885    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23886    pub quality: u8,
23887    #[doc = "Flow rate about X axis"]
23888    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23889    pub flow_rate_x: f32,
23890    #[doc = "Flow rate about Y axis"]
23891    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23892    pub flow_rate_y: f32,
23893}
23894impl OPTICAL_FLOW_DATA {
23895    pub const ENCODED_LEN: usize = 34usize;
23896    pub const DEFAULT: Self = Self {
23897        time_usec: 0_u64,
23898        flow_comp_m_x: 0.0_f32,
23899        flow_comp_m_y: 0.0_f32,
23900        ground_distance: 0.0_f32,
23901        flow_x: 0_i16,
23902        flow_y: 0_i16,
23903        sensor_id: 0_u8,
23904        quality: 0_u8,
23905        flow_rate_x: 0.0_f32,
23906        flow_rate_y: 0.0_f32,
23907    };
23908    #[cfg(feature = "arbitrary")]
23909    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23910        use arbitrary::{Arbitrary, Unstructured};
23911        let mut buf = [0u8; 1024];
23912        rng.fill_bytes(&mut buf);
23913        let mut unstructured = Unstructured::new(&buf);
23914        Self::arbitrary(&mut unstructured).unwrap_or_default()
23915    }
23916}
23917impl Default for OPTICAL_FLOW_DATA {
23918    fn default() -> Self {
23919        Self::DEFAULT.clone()
23920    }
23921}
23922impl MessageData for OPTICAL_FLOW_DATA {
23923    type Message = MavMessage;
23924    const ID: u32 = 100u32;
23925    const NAME: &'static str = "OPTICAL_FLOW";
23926    const EXTRA_CRC: u8 = 175u8;
23927    const ENCODED_LEN: usize = 34usize;
23928    fn deser(
23929        _version: MavlinkVersion,
23930        __input: &[u8],
23931    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23932        let avail_len = __input.len();
23933        let mut payload_buf = [0; Self::ENCODED_LEN];
23934        let mut buf = if avail_len < Self::ENCODED_LEN {
23935            payload_buf[0..avail_len].copy_from_slice(__input);
23936            Bytes::new(&payload_buf)
23937        } else {
23938            Bytes::new(__input)
23939        };
23940        let mut __struct = Self::default();
23941        __struct.time_usec = buf.get_u64_le()?;
23942        __struct.flow_comp_m_x = buf.get_f32_le()?;
23943        __struct.flow_comp_m_y = buf.get_f32_le()?;
23944        __struct.ground_distance = buf.get_f32_le()?;
23945        __struct.flow_x = buf.get_i16_le()?;
23946        __struct.flow_y = buf.get_i16_le()?;
23947        __struct.sensor_id = buf.get_u8()?;
23948        __struct.quality = buf.get_u8()?;
23949        __struct.flow_rate_x = buf.get_f32_le()?;
23950        __struct.flow_rate_y = buf.get_f32_le()?;
23951        Ok(__struct)
23952    }
23953    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23954        let mut __tmp = BytesMut::new(bytes);
23955        #[allow(clippy::absurd_extreme_comparisons)]
23956        #[allow(unused_comparisons)]
23957        if __tmp.remaining() < Self::ENCODED_LEN {
23958            panic!(
23959                "buffer is too small (need {} bytes, but got {})",
23960                Self::ENCODED_LEN,
23961                __tmp.remaining(),
23962            )
23963        }
23964        __tmp.put_u64_le(self.time_usec);
23965        __tmp.put_f32_le(self.flow_comp_m_x);
23966        __tmp.put_f32_le(self.flow_comp_m_y);
23967        __tmp.put_f32_le(self.ground_distance);
23968        __tmp.put_i16_le(self.flow_x);
23969        __tmp.put_i16_le(self.flow_y);
23970        __tmp.put_u8(self.sensor_id);
23971        __tmp.put_u8(self.quality);
23972        if matches!(version, MavlinkVersion::V2) {
23973            __tmp.put_f32_le(self.flow_rate_x);
23974            __tmp.put_f32_le(self.flow_rate_y);
23975            let len = __tmp.len();
23976            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23977        } else {
23978            __tmp.len()
23979        }
23980    }
23981}
23982#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23983#[doc = ""]
23984#[doc = "ID: 106"]
23985#[derive(Debug, Clone, PartialEq)]
23986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23988#[cfg_attr(feature = "ts", derive(TS))]
23989#[cfg_attr(feature = "ts", ts(export))]
23990pub struct OPTICAL_FLOW_RAD_DATA {
23991    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23992    pub time_usec: u64,
23993    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23994    pub integration_time_us: u32,
23995    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23996    pub integrated_x: f32,
23997    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23998    pub integrated_y: f32,
23999    #[doc = "RH rotation around X axis"]
24000    pub integrated_xgyro: f32,
24001    #[doc = "RH rotation around Y axis"]
24002    pub integrated_ygyro: f32,
24003    #[doc = "RH rotation around Z axis"]
24004    pub integrated_zgyro: f32,
24005    #[doc = "Time since the distance was sampled."]
24006    pub time_delta_distance_us: u32,
24007    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
24008    pub distance: f32,
24009    #[doc = "Temperature"]
24010    pub temperature: i16,
24011    #[doc = "Sensor ID"]
24012    pub sensor_id: u8,
24013    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
24014    pub quality: u8,
24015}
24016impl OPTICAL_FLOW_RAD_DATA {
24017    pub const ENCODED_LEN: usize = 44usize;
24018    pub const DEFAULT: Self = Self {
24019        time_usec: 0_u64,
24020        integration_time_us: 0_u32,
24021        integrated_x: 0.0_f32,
24022        integrated_y: 0.0_f32,
24023        integrated_xgyro: 0.0_f32,
24024        integrated_ygyro: 0.0_f32,
24025        integrated_zgyro: 0.0_f32,
24026        time_delta_distance_us: 0_u32,
24027        distance: 0.0_f32,
24028        temperature: 0_i16,
24029        sensor_id: 0_u8,
24030        quality: 0_u8,
24031    };
24032    #[cfg(feature = "arbitrary")]
24033    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24034        use arbitrary::{Arbitrary, Unstructured};
24035        let mut buf = [0u8; 1024];
24036        rng.fill_bytes(&mut buf);
24037        let mut unstructured = Unstructured::new(&buf);
24038        Self::arbitrary(&mut unstructured).unwrap_or_default()
24039    }
24040}
24041impl Default for OPTICAL_FLOW_RAD_DATA {
24042    fn default() -> Self {
24043        Self::DEFAULT.clone()
24044    }
24045}
24046impl MessageData for OPTICAL_FLOW_RAD_DATA {
24047    type Message = MavMessage;
24048    const ID: u32 = 106u32;
24049    const NAME: &'static str = "OPTICAL_FLOW_RAD";
24050    const EXTRA_CRC: u8 = 138u8;
24051    const ENCODED_LEN: usize = 44usize;
24052    fn deser(
24053        _version: MavlinkVersion,
24054        __input: &[u8],
24055    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24056        let avail_len = __input.len();
24057        let mut payload_buf = [0; Self::ENCODED_LEN];
24058        let mut buf = if avail_len < Self::ENCODED_LEN {
24059            payload_buf[0..avail_len].copy_from_slice(__input);
24060            Bytes::new(&payload_buf)
24061        } else {
24062            Bytes::new(__input)
24063        };
24064        let mut __struct = Self::default();
24065        __struct.time_usec = buf.get_u64_le()?;
24066        __struct.integration_time_us = buf.get_u32_le()?;
24067        __struct.integrated_x = buf.get_f32_le()?;
24068        __struct.integrated_y = buf.get_f32_le()?;
24069        __struct.integrated_xgyro = buf.get_f32_le()?;
24070        __struct.integrated_ygyro = buf.get_f32_le()?;
24071        __struct.integrated_zgyro = buf.get_f32_le()?;
24072        __struct.time_delta_distance_us = buf.get_u32_le()?;
24073        __struct.distance = buf.get_f32_le()?;
24074        __struct.temperature = buf.get_i16_le()?;
24075        __struct.sensor_id = buf.get_u8()?;
24076        __struct.quality = buf.get_u8()?;
24077        Ok(__struct)
24078    }
24079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24080        let mut __tmp = BytesMut::new(bytes);
24081        #[allow(clippy::absurd_extreme_comparisons)]
24082        #[allow(unused_comparisons)]
24083        if __tmp.remaining() < Self::ENCODED_LEN {
24084            panic!(
24085                "buffer is too small (need {} bytes, but got {})",
24086                Self::ENCODED_LEN,
24087                __tmp.remaining(),
24088            )
24089        }
24090        __tmp.put_u64_le(self.time_usec);
24091        __tmp.put_u32_le(self.integration_time_us);
24092        __tmp.put_f32_le(self.integrated_x);
24093        __tmp.put_f32_le(self.integrated_y);
24094        __tmp.put_f32_le(self.integrated_xgyro);
24095        __tmp.put_f32_le(self.integrated_ygyro);
24096        __tmp.put_f32_le(self.integrated_zgyro);
24097        __tmp.put_u32_le(self.time_delta_distance_us);
24098        __tmp.put_f32_le(self.distance);
24099        __tmp.put_i16_le(self.temperature);
24100        __tmp.put_u8(self.sensor_id);
24101        __tmp.put_u8(self.quality);
24102        if matches!(version, MavlinkVersion::V2) {
24103            let len = __tmp.len();
24104            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24105        } else {
24106            __tmp.len()
24107        }
24108    }
24109}
24110#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
24111#[doc = ""]
24112#[doc = "ID: 360"]
24113#[derive(Debug, Clone, PartialEq)]
24114#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24115#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24116#[cfg_attr(feature = "ts", derive(TS))]
24117#[cfg_attr(feature = "ts", ts(export))]
24118pub struct ORBIT_EXECUTION_STATUS_DATA {
24119    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24120    pub time_usec: u64,
24121    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
24122    pub radius: f32,
24123    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
24124    pub x: i32,
24125    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
24126    pub y: i32,
24127    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
24128    pub z: f32,
24129    #[doc = "The coordinate system of the fields: x, y, z."]
24130    pub frame: MavFrame,
24131}
24132impl ORBIT_EXECUTION_STATUS_DATA {
24133    pub const ENCODED_LEN: usize = 25usize;
24134    pub const DEFAULT: Self = Self {
24135        time_usec: 0_u64,
24136        radius: 0.0_f32,
24137        x: 0_i32,
24138        y: 0_i32,
24139        z: 0.0_f32,
24140        frame: MavFrame::DEFAULT,
24141    };
24142    #[cfg(feature = "arbitrary")]
24143    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24144        use arbitrary::{Arbitrary, Unstructured};
24145        let mut buf = [0u8; 1024];
24146        rng.fill_bytes(&mut buf);
24147        let mut unstructured = Unstructured::new(&buf);
24148        Self::arbitrary(&mut unstructured).unwrap_or_default()
24149    }
24150}
24151impl Default for ORBIT_EXECUTION_STATUS_DATA {
24152    fn default() -> Self {
24153        Self::DEFAULT.clone()
24154    }
24155}
24156impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
24157    type Message = MavMessage;
24158    const ID: u32 = 360u32;
24159    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
24160    const EXTRA_CRC: u8 = 11u8;
24161    const ENCODED_LEN: usize = 25usize;
24162    fn deser(
24163        _version: MavlinkVersion,
24164        __input: &[u8],
24165    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24166        let avail_len = __input.len();
24167        let mut payload_buf = [0; Self::ENCODED_LEN];
24168        let mut buf = if avail_len < Self::ENCODED_LEN {
24169            payload_buf[0..avail_len].copy_from_slice(__input);
24170            Bytes::new(&payload_buf)
24171        } else {
24172            Bytes::new(__input)
24173        };
24174        let mut __struct = Self::default();
24175        __struct.time_usec = buf.get_u64_le()?;
24176        __struct.radius = buf.get_f32_le()?;
24177        __struct.x = buf.get_i32_le()?;
24178        __struct.y = buf.get_i32_le()?;
24179        __struct.z = buf.get_f32_le()?;
24180        let tmp = buf.get_u8()?;
24181        __struct.frame =
24182            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24183                enum_type: "MavFrame",
24184                value: tmp as u64,
24185            })?;
24186        Ok(__struct)
24187    }
24188    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24189        let mut __tmp = BytesMut::new(bytes);
24190        #[allow(clippy::absurd_extreme_comparisons)]
24191        #[allow(unused_comparisons)]
24192        if __tmp.remaining() < Self::ENCODED_LEN {
24193            panic!(
24194                "buffer is too small (need {} bytes, but got {})",
24195                Self::ENCODED_LEN,
24196                __tmp.remaining(),
24197            )
24198        }
24199        __tmp.put_u64_le(self.time_usec);
24200        __tmp.put_f32_le(self.radius);
24201        __tmp.put_i32_le(self.x);
24202        __tmp.put_i32_le(self.y);
24203        __tmp.put_f32_le(self.z);
24204        __tmp.put_u8(self.frame as u8);
24205        if matches!(version, MavlinkVersion::V2) {
24206            let len = __tmp.len();
24207            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24208        } else {
24209            __tmp.len()
24210        }
24211    }
24212}
24213#[doc = "Response from a PARAM_EXT_SET message."]
24214#[doc = ""]
24215#[doc = "ID: 324"]
24216#[derive(Debug, Clone, PartialEq)]
24217#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24219#[cfg_attr(feature = "ts", derive(TS))]
24220#[cfg_attr(feature = "ts", ts(export))]
24221pub struct PARAM_EXT_ACK_DATA {
24222    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24223    #[cfg_attr(feature = "ts", ts(type = "string"))]
24224    pub param_id: CharArray<16>,
24225    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
24226    #[cfg_attr(feature = "ts", ts(type = "string"))]
24227    pub param_value: CharArray<128>,
24228    #[doc = "Parameter type."]
24229    pub param_type: MavParamExtType,
24230    #[doc = "Result code."]
24231    pub param_result: ParamAck,
24232}
24233impl PARAM_EXT_ACK_DATA {
24234    pub const ENCODED_LEN: usize = 146usize;
24235    pub const DEFAULT: Self = Self {
24236        param_id: CharArray::new([0_u8; 16usize]),
24237        param_value: CharArray::new([0_u8; 128usize]),
24238        param_type: MavParamExtType::DEFAULT,
24239        param_result: ParamAck::DEFAULT,
24240    };
24241    #[cfg(feature = "arbitrary")]
24242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24243        use arbitrary::{Arbitrary, Unstructured};
24244        let mut buf = [0u8; 1024];
24245        rng.fill_bytes(&mut buf);
24246        let mut unstructured = Unstructured::new(&buf);
24247        Self::arbitrary(&mut unstructured).unwrap_or_default()
24248    }
24249}
24250impl Default for PARAM_EXT_ACK_DATA {
24251    fn default() -> Self {
24252        Self::DEFAULT.clone()
24253    }
24254}
24255impl MessageData for PARAM_EXT_ACK_DATA {
24256    type Message = MavMessage;
24257    const ID: u32 = 324u32;
24258    const NAME: &'static str = "PARAM_EXT_ACK";
24259    const EXTRA_CRC: u8 = 132u8;
24260    const ENCODED_LEN: usize = 146usize;
24261    fn deser(
24262        _version: MavlinkVersion,
24263        __input: &[u8],
24264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24265        let avail_len = __input.len();
24266        let mut payload_buf = [0; Self::ENCODED_LEN];
24267        let mut buf = if avail_len < Self::ENCODED_LEN {
24268            payload_buf[0..avail_len].copy_from_slice(__input);
24269            Bytes::new(&payload_buf)
24270        } else {
24271            Bytes::new(__input)
24272        };
24273        let mut __struct = Self::default();
24274        let mut tmp = [0_u8; 16usize];
24275        for v in &mut tmp {
24276            *v = buf.get_u8()?;
24277        }
24278        __struct.param_id = CharArray::new(tmp);
24279        let mut tmp = [0_u8; 128usize];
24280        for v in &mut tmp {
24281            *v = buf.get_u8()?;
24282        }
24283        __struct.param_value = CharArray::new(tmp);
24284        let tmp = buf.get_u8()?;
24285        __struct.param_type =
24286            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24287                enum_type: "MavParamExtType",
24288                value: tmp as u64,
24289            })?;
24290        let tmp = buf.get_u8()?;
24291        __struct.param_result =
24292            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24293                enum_type: "ParamAck",
24294                value: tmp as u64,
24295            })?;
24296        Ok(__struct)
24297    }
24298    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24299        let mut __tmp = BytesMut::new(bytes);
24300        #[allow(clippy::absurd_extreme_comparisons)]
24301        #[allow(unused_comparisons)]
24302        if __tmp.remaining() < Self::ENCODED_LEN {
24303            panic!(
24304                "buffer is too small (need {} bytes, but got {})",
24305                Self::ENCODED_LEN,
24306                __tmp.remaining(),
24307            )
24308        }
24309        for val in &self.param_id {
24310            __tmp.put_u8(*val);
24311        }
24312        for val in &self.param_value {
24313            __tmp.put_u8(*val);
24314        }
24315        __tmp.put_u8(self.param_type as u8);
24316        __tmp.put_u8(self.param_result as u8);
24317        if matches!(version, MavlinkVersion::V2) {
24318            let len = __tmp.len();
24319            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24320        } else {
24321            __tmp.len()
24322        }
24323    }
24324}
24325#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
24326#[doc = ""]
24327#[doc = "ID: 321"]
24328#[derive(Debug, Clone, PartialEq)]
24329#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24330#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24331#[cfg_attr(feature = "ts", derive(TS))]
24332#[cfg_attr(feature = "ts", ts(export))]
24333pub struct PARAM_EXT_REQUEST_LIST_DATA {
24334    #[doc = "System ID"]
24335    pub target_system: u8,
24336    #[doc = "Component ID"]
24337    pub target_component: u8,
24338}
24339impl PARAM_EXT_REQUEST_LIST_DATA {
24340    pub const ENCODED_LEN: usize = 2usize;
24341    pub const DEFAULT: Self = Self {
24342        target_system: 0_u8,
24343        target_component: 0_u8,
24344    };
24345    #[cfg(feature = "arbitrary")]
24346    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24347        use arbitrary::{Arbitrary, Unstructured};
24348        let mut buf = [0u8; 1024];
24349        rng.fill_bytes(&mut buf);
24350        let mut unstructured = Unstructured::new(&buf);
24351        Self::arbitrary(&mut unstructured).unwrap_or_default()
24352    }
24353}
24354impl Default for PARAM_EXT_REQUEST_LIST_DATA {
24355    fn default() -> Self {
24356        Self::DEFAULT.clone()
24357    }
24358}
24359impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
24360    type Message = MavMessage;
24361    const ID: u32 = 321u32;
24362    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
24363    const EXTRA_CRC: u8 = 88u8;
24364    const ENCODED_LEN: usize = 2usize;
24365    fn deser(
24366        _version: MavlinkVersion,
24367        __input: &[u8],
24368    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24369        let avail_len = __input.len();
24370        let mut payload_buf = [0; Self::ENCODED_LEN];
24371        let mut buf = if avail_len < Self::ENCODED_LEN {
24372            payload_buf[0..avail_len].copy_from_slice(__input);
24373            Bytes::new(&payload_buf)
24374        } else {
24375            Bytes::new(__input)
24376        };
24377        let mut __struct = Self::default();
24378        __struct.target_system = buf.get_u8()?;
24379        __struct.target_component = buf.get_u8()?;
24380        Ok(__struct)
24381    }
24382    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24383        let mut __tmp = BytesMut::new(bytes);
24384        #[allow(clippy::absurd_extreme_comparisons)]
24385        #[allow(unused_comparisons)]
24386        if __tmp.remaining() < Self::ENCODED_LEN {
24387            panic!(
24388                "buffer is too small (need {} bytes, but got {})",
24389                Self::ENCODED_LEN,
24390                __tmp.remaining(),
24391            )
24392        }
24393        __tmp.put_u8(self.target_system);
24394        __tmp.put_u8(self.target_component);
24395        if matches!(version, MavlinkVersion::V2) {
24396            let len = __tmp.len();
24397            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24398        } else {
24399            __tmp.len()
24400        }
24401    }
24402}
24403#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
24404#[doc = ""]
24405#[doc = "ID: 320"]
24406#[derive(Debug, Clone, PartialEq)]
24407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24409#[cfg_attr(feature = "ts", derive(TS))]
24410#[cfg_attr(feature = "ts", ts(export))]
24411pub struct PARAM_EXT_REQUEST_READ_DATA {
24412    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
24413    pub param_index: i16,
24414    #[doc = "System ID"]
24415    pub target_system: u8,
24416    #[doc = "Component ID"]
24417    pub target_component: u8,
24418    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24419    #[cfg_attr(feature = "ts", ts(type = "string"))]
24420    pub param_id: CharArray<16>,
24421}
24422impl PARAM_EXT_REQUEST_READ_DATA {
24423    pub const ENCODED_LEN: usize = 20usize;
24424    pub const DEFAULT: Self = Self {
24425        param_index: 0_i16,
24426        target_system: 0_u8,
24427        target_component: 0_u8,
24428        param_id: CharArray::new([0_u8; 16usize]),
24429    };
24430    #[cfg(feature = "arbitrary")]
24431    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24432        use arbitrary::{Arbitrary, Unstructured};
24433        let mut buf = [0u8; 1024];
24434        rng.fill_bytes(&mut buf);
24435        let mut unstructured = Unstructured::new(&buf);
24436        Self::arbitrary(&mut unstructured).unwrap_or_default()
24437    }
24438}
24439impl Default for PARAM_EXT_REQUEST_READ_DATA {
24440    fn default() -> Self {
24441        Self::DEFAULT.clone()
24442    }
24443}
24444impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
24445    type Message = MavMessage;
24446    const ID: u32 = 320u32;
24447    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
24448    const EXTRA_CRC: u8 = 243u8;
24449    const ENCODED_LEN: usize = 20usize;
24450    fn deser(
24451        _version: MavlinkVersion,
24452        __input: &[u8],
24453    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24454        let avail_len = __input.len();
24455        let mut payload_buf = [0; Self::ENCODED_LEN];
24456        let mut buf = if avail_len < Self::ENCODED_LEN {
24457            payload_buf[0..avail_len].copy_from_slice(__input);
24458            Bytes::new(&payload_buf)
24459        } else {
24460            Bytes::new(__input)
24461        };
24462        let mut __struct = Self::default();
24463        __struct.param_index = buf.get_i16_le()?;
24464        __struct.target_system = buf.get_u8()?;
24465        __struct.target_component = buf.get_u8()?;
24466        let mut tmp = [0_u8; 16usize];
24467        for v in &mut tmp {
24468            *v = buf.get_u8()?;
24469        }
24470        __struct.param_id = CharArray::new(tmp);
24471        Ok(__struct)
24472    }
24473    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24474        let mut __tmp = BytesMut::new(bytes);
24475        #[allow(clippy::absurd_extreme_comparisons)]
24476        #[allow(unused_comparisons)]
24477        if __tmp.remaining() < Self::ENCODED_LEN {
24478            panic!(
24479                "buffer is too small (need {} bytes, but got {})",
24480                Self::ENCODED_LEN,
24481                __tmp.remaining(),
24482            )
24483        }
24484        __tmp.put_i16_le(self.param_index);
24485        __tmp.put_u8(self.target_system);
24486        __tmp.put_u8(self.target_component);
24487        for val in &self.param_id {
24488            __tmp.put_u8(*val);
24489        }
24490        if matches!(version, MavlinkVersion::V2) {
24491            let len = __tmp.len();
24492            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24493        } else {
24494            __tmp.len()
24495        }
24496    }
24497}
24498#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
24499#[doc = ""]
24500#[doc = "ID: 323"]
24501#[derive(Debug, Clone, PartialEq)]
24502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24503#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24504#[cfg_attr(feature = "ts", derive(TS))]
24505#[cfg_attr(feature = "ts", ts(export))]
24506pub struct PARAM_EXT_SET_DATA {
24507    #[doc = "System ID"]
24508    pub target_system: u8,
24509    #[doc = "Component ID"]
24510    pub target_component: u8,
24511    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24512    #[cfg_attr(feature = "ts", ts(type = "string"))]
24513    pub param_id: CharArray<16>,
24514    #[doc = "Parameter value"]
24515    #[cfg_attr(feature = "ts", ts(type = "string"))]
24516    pub param_value: CharArray<128>,
24517    #[doc = "Parameter type."]
24518    pub param_type: MavParamExtType,
24519}
24520impl PARAM_EXT_SET_DATA {
24521    pub const ENCODED_LEN: usize = 147usize;
24522    pub const DEFAULT: Self = Self {
24523        target_system: 0_u8,
24524        target_component: 0_u8,
24525        param_id: CharArray::new([0_u8; 16usize]),
24526        param_value: CharArray::new([0_u8; 128usize]),
24527        param_type: MavParamExtType::DEFAULT,
24528    };
24529    #[cfg(feature = "arbitrary")]
24530    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24531        use arbitrary::{Arbitrary, Unstructured};
24532        let mut buf = [0u8; 1024];
24533        rng.fill_bytes(&mut buf);
24534        let mut unstructured = Unstructured::new(&buf);
24535        Self::arbitrary(&mut unstructured).unwrap_or_default()
24536    }
24537}
24538impl Default for PARAM_EXT_SET_DATA {
24539    fn default() -> Self {
24540        Self::DEFAULT.clone()
24541    }
24542}
24543impl MessageData for PARAM_EXT_SET_DATA {
24544    type Message = MavMessage;
24545    const ID: u32 = 323u32;
24546    const NAME: &'static str = "PARAM_EXT_SET";
24547    const EXTRA_CRC: u8 = 78u8;
24548    const ENCODED_LEN: usize = 147usize;
24549    fn deser(
24550        _version: MavlinkVersion,
24551        __input: &[u8],
24552    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24553        let avail_len = __input.len();
24554        let mut payload_buf = [0; Self::ENCODED_LEN];
24555        let mut buf = if avail_len < Self::ENCODED_LEN {
24556            payload_buf[0..avail_len].copy_from_slice(__input);
24557            Bytes::new(&payload_buf)
24558        } else {
24559            Bytes::new(__input)
24560        };
24561        let mut __struct = Self::default();
24562        __struct.target_system = buf.get_u8()?;
24563        __struct.target_component = buf.get_u8()?;
24564        let mut tmp = [0_u8; 16usize];
24565        for v in &mut tmp {
24566            *v = buf.get_u8()?;
24567        }
24568        __struct.param_id = CharArray::new(tmp);
24569        let mut tmp = [0_u8; 128usize];
24570        for v in &mut tmp {
24571            *v = buf.get_u8()?;
24572        }
24573        __struct.param_value = CharArray::new(tmp);
24574        let tmp = buf.get_u8()?;
24575        __struct.param_type =
24576            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24577                enum_type: "MavParamExtType",
24578                value: tmp as u64,
24579            })?;
24580        Ok(__struct)
24581    }
24582    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24583        let mut __tmp = BytesMut::new(bytes);
24584        #[allow(clippy::absurd_extreme_comparisons)]
24585        #[allow(unused_comparisons)]
24586        if __tmp.remaining() < Self::ENCODED_LEN {
24587            panic!(
24588                "buffer is too small (need {} bytes, but got {})",
24589                Self::ENCODED_LEN,
24590                __tmp.remaining(),
24591            )
24592        }
24593        __tmp.put_u8(self.target_system);
24594        __tmp.put_u8(self.target_component);
24595        for val in &self.param_id {
24596            __tmp.put_u8(*val);
24597        }
24598        for val in &self.param_value {
24599            __tmp.put_u8(*val);
24600        }
24601        __tmp.put_u8(self.param_type as u8);
24602        if matches!(version, MavlinkVersion::V2) {
24603            let len = __tmp.len();
24604            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24605        } else {
24606            __tmp.len()
24607        }
24608    }
24609}
24610#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
24611#[doc = ""]
24612#[doc = "ID: 322"]
24613#[derive(Debug, Clone, PartialEq)]
24614#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24615#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24616#[cfg_attr(feature = "ts", derive(TS))]
24617#[cfg_attr(feature = "ts", ts(export))]
24618pub struct PARAM_EXT_VALUE_DATA {
24619    #[doc = "Total number of parameters"]
24620    pub param_count: u16,
24621    #[doc = "Index of this parameter"]
24622    pub param_index: u16,
24623    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24624    #[cfg_attr(feature = "ts", ts(type = "string"))]
24625    pub param_id: CharArray<16>,
24626    #[doc = "Parameter value"]
24627    #[cfg_attr(feature = "ts", ts(type = "string"))]
24628    pub param_value: CharArray<128>,
24629    #[doc = "Parameter type."]
24630    pub param_type: MavParamExtType,
24631}
24632impl PARAM_EXT_VALUE_DATA {
24633    pub const ENCODED_LEN: usize = 149usize;
24634    pub const DEFAULT: Self = Self {
24635        param_count: 0_u16,
24636        param_index: 0_u16,
24637        param_id: CharArray::new([0_u8; 16usize]),
24638        param_value: CharArray::new([0_u8; 128usize]),
24639        param_type: MavParamExtType::DEFAULT,
24640    };
24641    #[cfg(feature = "arbitrary")]
24642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24643        use arbitrary::{Arbitrary, Unstructured};
24644        let mut buf = [0u8; 1024];
24645        rng.fill_bytes(&mut buf);
24646        let mut unstructured = Unstructured::new(&buf);
24647        Self::arbitrary(&mut unstructured).unwrap_or_default()
24648    }
24649}
24650impl Default for PARAM_EXT_VALUE_DATA {
24651    fn default() -> Self {
24652        Self::DEFAULT.clone()
24653    }
24654}
24655impl MessageData for PARAM_EXT_VALUE_DATA {
24656    type Message = MavMessage;
24657    const ID: u32 = 322u32;
24658    const NAME: &'static str = "PARAM_EXT_VALUE";
24659    const EXTRA_CRC: u8 = 243u8;
24660    const ENCODED_LEN: usize = 149usize;
24661    fn deser(
24662        _version: MavlinkVersion,
24663        __input: &[u8],
24664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24665        let avail_len = __input.len();
24666        let mut payload_buf = [0; Self::ENCODED_LEN];
24667        let mut buf = if avail_len < Self::ENCODED_LEN {
24668            payload_buf[0..avail_len].copy_from_slice(__input);
24669            Bytes::new(&payload_buf)
24670        } else {
24671            Bytes::new(__input)
24672        };
24673        let mut __struct = Self::default();
24674        __struct.param_count = buf.get_u16_le()?;
24675        __struct.param_index = buf.get_u16_le()?;
24676        let mut tmp = [0_u8; 16usize];
24677        for v in &mut tmp {
24678            *v = buf.get_u8()?;
24679        }
24680        __struct.param_id = CharArray::new(tmp);
24681        let mut tmp = [0_u8; 128usize];
24682        for v in &mut tmp {
24683            *v = buf.get_u8()?;
24684        }
24685        __struct.param_value = CharArray::new(tmp);
24686        let tmp = buf.get_u8()?;
24687        __struct.param_type =
24688            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24689                enum_type: "MavParamExtType",
24690                value: tmp as u64,
24691            })?;
24692        Ok(__struct)
24693    }
24694    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24695        let mut __tmp = BytesMut::new(bytes);
24696        #[allow(clippy::absurd_extreme_comparisons)]
24697        #[allow(unused_comparisons)]
24698        if __tmp.remaining() < Self::ENCODED_LEN {
24699            panic!(
24700                "buffer is too small (need {} bytes, but got {})",
24701                Self::ENCODED_LEN,
24702                __tmp.remaining(),
24703            )
24704        }
24705        __tmp.put_u16_le(self.param_count);
24706        __tmp.put_u16_le(self.param_index);
24707        for val in &self.param_id {
24708            __tmp.put_u8(*val);
24709        }
24710        for val in &self.param_value {
24711            __tmp.put_u8(*val);
24712        }
24713        __tmp.put_u8(self.param_type as u8);
24714        if matches!(version, MavlinkVersion::V2) {
24715            let len = __tmp.len();
24716            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24717        } else {
24718            __tmp.len()
24719        }
24720    }
24721}
24722#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
24723#[doc = ""]
24724#[doc = "ID: 50"]
24725#[derive(Debug, Clone, PartialEq)]
24726#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24728#[cfg_attr(feature = "ts", derive(TS))]
24729#[cfg_attr(feature = "ts", ts(export))]
24730pub struct PARAM_MAP_RC_DATA {
24731    #[doc = "Initial parameter value"]
24732    pub param_value0: f32,
24733    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
24734    pub scale: f32,
24735    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
24736    pub param_value_min: f32,
24737    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
24738    pub param_value_max: f32,
24739    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
24740    pub param_index: i16,
24741    #[doc = "System ID"]
24742    pub target_system: u8,
24743    #[doc = "Component ID"]
24744    pub target_component: u8,
24745    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24746    #[cfg_attr(feature = "ts", ts(type = "string"))]
24747    pub param_id: CharArray<16>,
24748    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
24749    pub parameter_rc_channel_index: u8,
24750}
24751impl PARAM_MAP_RC_DATA {
24752    pub const ENCODED_LEN: usize = 37usize;
24753    pub const DEFAULT: Self = Self {
24754        param_value0: 0.0_f32,
24755        scale: 0.0_f32,
24756        param_value_min: 0.0_f32,
24757        param_value_max: 0.0_f32,
24758        param_index: 0_i16,
24759        target_system: 0_u8,
24760        target_component: 0_u8,
24761        param_id: CharArray::new([0_u8; 16usize]),
24762        parameter_rc_channel_index: 0_u8,
24763    };
24764    #[cfg(feature = "arbitrary")]
24765    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24766        use arbitrary::{Arbitrary, Unstructured};
24767        let mut buf = [0u8; 1024];
24768        rng.fill_bytes(&mut buf);
24769        let mut unstructured = Unstructured::new(&buf);
24770        Self::arbitrary(&mut unstructured).unwrap_or_default()
24771    }
24772}
24773impl Default for PARAM_MAP_RC_DATA {
24774    fn default() -> Self {
24775        Self::DEFAULT.clone()
24776    }
24777}
24778impl MessageData for PARAM_MAP_RC_DATA {
24779    type Message = MavMessage;
24780    const ID: u32 = 50u32;
24781    const NAME: &'static str = "PARAM_MAP_RC";
24782    const EXTRA_CRC: u8 = 78u8;
24783    const ENCODED_LEN: usize = 37usize;
24784    fn deser(
24785        _version: MavlinkVersion,
24786        __input: &[u8],
24787    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24788        let avail_len = __input.len();
24789        let mut payload_buf = [0; Self::ENCODED_LEN];
24790        let mut buf = if avail_len < Self::ENCODED_LEN {
24791            payload_buf[0..avail_len].copy_from_slice(__input);
24792            Bytes::new(&payload_buf)
24793        } else {
24794            Bytes::new(__input)
24795        };
24796        let mut __struct = Self::default();
24797        __struct.param_value0 = buf.get_f32_le()?;
24798        __struct.scale = buf.get_f32_le()?;
24799        __struct.param_value_min = buf.get_f32_le()?;
24800        __struct.param_value_max = buf.get_f32_le()?;
24801        __struct.param_index = buf.get_i16_le()?;
24802        __struct.target_system = buf.get_u8()?;
24803        __struct.target_component = buf.get_u8()?;
24804        let mut tmp = [0_u8; 16usize];
24805        for v in &mut tmp {
24806            *v = buf.get_u8()?;
24807        }
24808        __struct.param_id = CharArray::new(tmp);
24809        __struct.parameter_rc_channel_index = buf.get_u8()?;
24810        Ok(__struct)
24811    }
24812    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24813        let mut __tmp = BytesMut::new(bytes);
24814        #[allow(clippy::absurd_extreme_comparisons)]
24815        #[allow(unused_comparisons)]
24816        if __tmp.remaining() < Self::ENCODED_LEN {
24817            panic!(
24818                "buffer is too small (need {} bytes, but got {})",
24819                Self::ENCODED_LEN,
24820                __tmp.remaining(),
24821            )
24822        }
24823        __tmp.put_f32_le(self.param_value0);
24824        __tmp.put_f32_le(self.scale);
24825        __tmp.put_f32_le(self.param_value_min);
24826        __tmp.put_f32_le(self.param_value_max);
24827        __tmp.put_i16_le(self.param_index);
24828        __tmp.put_u8(self.target_system);
24829        __tmp.put_u8(self.target_component);
24830        for val in &self.param_id {
24831            __tmp.put_u8(*val);
24832        }
24833        __tmp.put_u8(self.parameter_rc_channel_index);
24834        if matches!(version, MavlinkVersion::V2) {
24835            let len = __tmp.len();
24836            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24837        } else {
24838            __tmp.len()
24839        }
24840    }
24841}
24842#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24843#[doc = ""]
24844#[doc = "ID: 21"]
24845#[derive(Debug, Clone, PartialEq)]
24846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24847#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24848#[cfg_attr(feature = "ts", derive(TS))]
24849#[cfg_attr(feature = "ts", ts(export))]
24850pub struct PARAM_REQUEST_LIST_DATA {
24851    #[doc = "System ID"]
24852    pub target_system: u8,
24853    #[doc = "Component ID"]
24854    pub target_component: u8,
24855}
24856impl PARAM_REQUEST_LIST_DATA {
24857    pub const ENCODED_LEN: usize = 2usize;
24858    pub const DEFAULT: Self = Self {
24859        target_system: 0_u8,
24860        target_component: 0_u8,
24861    };
24862    #[cfg(feature = "arbitrary")]
24863    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24864        use arbitrary::{Arbitrary, Unstructured};
24865        let mut buf = [0u8; 1024];
24866        rng.fill_bytes(&mut buf);
24867        let mut unstructured = Unstructured::new(&buf);
24868        Self::arbitrary(&mut unstructured).unwrap_or_default()
24869    }
24870}
24871impl Default for PARAM_REQUEST_LIST_DATA {
24872    fn default() -> Self {
24873        Self::DEFAULT.clone()
24874    }
24875}
24876impl MessageData for PARAM_REQUEST_LIST_DATA {
24877    type Message = MavMessage;
24878    const ID: u32 = 21u32;
24879    const NAME: &'static str = "PARAM_REQUEST_LIST";
24880    const EXTRA_CRC: u8 = 159u8;
24881    const ENCODED_LEN: usize = 2usize;
24882    fn deser(
24883        _version: MavlinkVersion,
24884        __input: &[u8],
24885    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24886        let avail_len = __input.len();
24887        let mut payload_buf = [0; Self::ENCODED_LEN];
24888        let mut buf = if avail_len < Self::ENCODED_LEN {
24889            payload_buf[0..avail_len].copy_from_slice(__input);
24890            Bytes::new(&payload_buf)
24891        } else {
24892            Bytes::new(__input)
24893        };
24894        let mut __struct = Self::default();
24895        __struct.target_system = buf.get_u8()?;
24896        __struct.target_component = buf.get_u8()?;
24897        Ok(__struct)
24898    }
24899    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24900        let mut __tmp = BytesMut::new(bytes);
24901        #[allow(clippy::absurd_extreme_comparisons)]
24902        #[allow(unused_comparisons)]
24903        if __tmp.remaining() < Self::ENCODED_LEN {
24904            panic!(
24905                "buffer is too small (need {} bytes, but got {})",
24906                Self::ENCODED_LEN,
24907                __tmp.remaining(),
24908            )
24909        }
24910        __tmp.put_u8(self.target_system);
24911        __tmp.put_u8(self.target_component);
24912        if matches!(version, MavlinkVersion::V2) {
24913            let len = __tmp.len();
24914            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24915        } else {
24916            __tmp.len()
24917        }
24918    }
24919}
24920#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24921#[doc = ""]
24922#[doc = "ID: 20"]
24923#[derive(Debug, Clone, PartialEq)]
24924#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24925#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24926#[cfg_attr(feature = "ts", derive(TS))]
24927#[cfg_attr(feature = "ts", ts(export))]
24928pub struct PARAM_REQUEST_READ_DATA {
24929    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24930    pub param_index: i16,
24931    #[doc = "System ID"]
24932    pub target_system: u8,
24933    #[doc = "Component ID"]
24934    pub target_component: u8,
24935    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24936    #[cfg_attr(feature = "ts", ts(type = "string"))]
24937    pub param_id: CharArray<16>,
24938}
24939impl PARAM_REQUEST_READ_DATA {
24940    pub const ENCODED_LEN: usize = 20usize;
24941    pub const DEFAULT: Self = Self {
24942        param_index: 0_i16,
24943        target_system: 0_u8,
24944        target_component: 0_u8,
24945        param_id: CharArray::new([0_u8; 16usize]),
24946    };
24947    #[cfg(feature = "arbitrary")]
24948    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24949        use arbitrary::{Arbitrary, Unstructured};
24950        let mut buf = [0u8; 1024];
24951        rng.fill_bytes(&mut buf);
24952        let mut unstructured = Unstructured::new(&buf);
24953        Self::arbitrary(&mut unstructured).unwrap_or_default()
24954    }
24955}
24956impl Default for PARAM_REQUEST_READ_DATA {
24957    fn default() -> Self {
24958        Self::DEFAULT.clone()
24959    }
24960}
24961impl MessageData for PARAM_REQUEST_READ_DATA {
24962    type Message = MavMessage;
24963    const ID: u32 = 20u32;
24964    const NAME: &'static str = "PARAM_REQUEST_READ";
24965    const EXTRA_CRC: u8 = 214u8;
24966    const ENCODED_LEN: usize = 20usize;
24967    fn deser(
24968        _version: MavlinkVersion,
24969        __input: &[u8],
24970    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24971        let avail_len = __input.len();
24972        let mut payload_buf = [0; Self::ENCODED_LEN];
24973        let mut buf = if avail_len < Self::ENCODED_LEN {
24974            payload_buf[0..avail_len].copy_from_slice(__input);
24975            Bytes::new(&payload_buf)
24976        } else {
24977            Bytes::new(__input)
24978        };
24979        let mut __struct = Self::default();
24980        __struct.param_index = buf.get_i16_le()?;
24981        __struct.target_system = buf.get_u8()?;
24982        __struct.target_component = buf.get_u8()?;
24983        let mut tmp = [0_u8; 16usize];
24984        for v in &mut tmp {
24985            *v = buf.get_u8()?;
24986        }
24987        __struct.param_id = CharArray::new(tmp);
24988        Ok(__struct)
24989    }
24990    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24991        let mut __tmp = BytesMut::new(bytes);
24992        #[allow(clippy::absurd_extreme_comparisons)]
24993        #[allow(unused_comparisons)]
24994        if __tmp.remaining() < Self::ENCODED_LEN {
24995            panic!(
24996                "buffer is too small (need {} bytes, but got {})",
24997                Self::ENCODED_LEN,
24998                __tmp.remaining(),
24999            )
25000        }
25001        __tmp.put_i16_le(self.param_index);
25002        __tmp.put_u8(self.target_system);
25003        __tmp.put_u8(self.target_component);
25004        for val in &self.param_id {
25005            __tmp.put_u8(*val);
25006        }
25007        if matches!(version, MavlinkVersion::V2) {
25008            let len = __tmp.len();
25009            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25010        } else {
25011            __tmp.len()
25012        }
25013    }
25014}
25015#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
25016#[doc = ""]
25017#[doc = "ID: 23"]
25018#[derive(Debug, Clone, PartialEq)]
25019#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25020#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25021#[cfg_attr(feature = "ts", derive(TS))]
25022#[cfg_attr(feature = "ts", ts(export))]
25023pub struct PARAM_SET_DATA {
25024    #[doc = "Onboard parameter value"]
25025    pub param_value: f32,
25026    #[doc = "System ID"]
25027    pub target_system: u8,
25028    #[doc = "Component ID"]
25029    pub target_component: u8,
25030    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25031    #[cfg_attr(feature = "ts", ts(type = "string"))]
25032    pub param_id: CharArray<16>,
25033    #[doc = "Onboard parameter type."]
25034    pub param_type: MavParamType,
25035}
25036impl PARAM_SET_DATA {
25037    pub const ENCODED_LEN: usize = 23usize;
25038    pub const DEFAULT: Self = Self {
25039        param_value: 0.0_f32,
25040        target_system: 0_u8,
25041        target_component: 0_u8,
25042        param_id: CharArray::new([0_u8; 16usize]),
25043        param_type: MavParamType::DEFAULT,
25044    };
25045    #[cfg(feature = "arbitrary")]
25046    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25047        use arbitrary::{Arbitrary, Unstructured};
25048        let mut buf = [0u8; 1024];
25049        rng.fill_bytes(&mut buf);
25050        let mut unstructured = Unstructured::new(&buf);
25051        Self::arbitrary(&mut unstructured).unwrap_or_default()
25052    }
25053}
25054impl Default for PARAM_SET_DATA {
25055    fn default() -> Self {
25056        Self::DEFAULT.clone()
25057    }
25058}
25059impl MessageData for PARAM_SET_DATA {
25060    type Message = MavMessage;
25061    const ID: u32 = 23u32;
25062    const NAME: &'static str = "PARAM_SET";
25063    const EXTRA_CRC: u8 = 168u8;
25064    const ENCODED_LEN: usize = 23usize;
25065    fn deser(
25066        _version: MavlinkVersion,
25067        __input: &[u8],
25068    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25069        let avail_len = __input.len();
25070        let mut payload_buf = [0; Self::ENCODED_LEN];
25071        let mut buf = if avail_len < Self::ENCODED_LEN {
25072            payload_buf[0..avail_len].copy_from_slice(__input);
25073            Bytes::new(&payload_buf)
25074        } else {
25075            Bytes::new(__input)
25076        };
25077        let mut __struct = Self::default();
25078        __struct.param_value = buf.get_f32_le()?;
25079        __struct.target_system = buf.get_u8()?;
25080        __struct.target_component = buf.get_u8()?;
25081        let mut tmp = [0_u8; 16usize];
25082        for v in &mut tmp {
25083            *v = buf.get_u8()?;
25084        }
25085        __struct.param_id = CharArray::new(tmp);
25086        let tmp = buf.get_u8()?;
25087        __struct.param_type =
25088            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25089                enum_type: "MavParamType",
25090                value: tmp as u64,
25091            })?;
25092        Ok(__struct)
25093    }
25094    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25095        let mut __tmp = BytesMut::new(bytes);
25096        #[allow(clippy::absurd_extreme_comparisons)]
25097        #[allow(unused_comparisons)]
25098        if __tmp.remaining() < Self::ENCODED_LEN {
25099            panic!(
25100                "buffer is too small (need {} bytes, but got {})",
25101                Self::ENCODED_LEN,
25102                __tmp.remaining(),
25103            )
25104        }
25105        __tmp.put_f32_le(self.param_value);
25106        __tmp.put_u8(self.target_system);
25107        __tmp.put_u8(self.target_component);
25108        for val in &self.param_id {
25109            __tmp.put_u8(*val);
25110        }
25111        __tmp.put_u8(self.param_type as u8);
25112        if matches!(version, MavlinkVersion::V2) {
25113            let len = __tmp.len();
25114            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25115        } else {
25116            __tmp.len()
25117        }
25118    }
25119}
25120#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
25121#[doc = ""]
25122#[doc = "ID: 22"]
25123#[derive(Debug, Clone, PartialEq)]
25124#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25126#[cfg_attr(feature = "ts", derive(TS))]
25127#[cfg_attr(feature = "ts", ts(export))]
25128pub struct PARAM_VALUE_DATA {
25129    #[doc = "Onboard parameter value"]
25130    pub param_value: f32,
25131    #[doc = "Total number of onboard parameters"]
25132    pub param_count: u16,
25133    #[doc = "Index of this onboard parameter"]
25134    pub param_index: u16,
25135    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25136    #[cfg_attr(feature = "ts", ts(type = "string"))]
25137    pub param_id: CharArray<16>,
25138    #[doc = "Onboard parameter type."]
25139    pub param_type: MavParamType,
25140}
25141impl PARAM_VALUE_DATA {
25142    pub const ENCODED_LEN: usize = 25usize;
25143    pub const DEFAULT: Self = Self {
25144        param_value: 0.0_f32,
25145        param_count: 0_u16,
25146        param_index: 0_u16,
25147        param_id: CharArray::new([0_u8; 16usize]),
25148        param_type: MavParamType::DEFAULT,
25149    };
25150    #[cfg(feature = "arbitrary")]
25151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25152        use arbitrary::{Arbitrary, Unstructured};
25153        let mut buf = [0u8; 1024];
25154        rng.fill_bytes(&mut buf);
25155        let mut unstructured = Unstructured::new(&buf);
25156        Self::arbitrary(&mut unstructured).unwrap_or_default()
25157    }
25158}
25159impl Default for PARAM_VALUE_DATA {
25160    fn default() -> Self {
25161        Self::DEFAULT.clone()
25162    }
25163}
25164impl MessageData for PARAM_VALUE_DATA {
25165    type Message = MavMessage;
25166    const ID: u32 = 22u32;
25167    const NAME: &'static str = "PARAM_VALUE";
25168    const EXTRA_CRC: u8 = 220u8;
25169    const ENCODED_LEN: usize = 25usize;
25170    fn deser(
25171        _version: MavlinkVersion,
25172        __input: &[u8],
25173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25174        let avail_len = __input.len();
25175        let mut payload_buf = [0; Self::ENCODED_LEN];
25176        let mut buf = if avail_len < Self::ENCODED_LEN {
25177            payload_buf[0..avail_len].copy_from_slice(__input);
25178            Bytes::new(&payload_buf)
25179        } else {
25180            Bytes::new(__input)
25181        };
25182        let mut __struct = Self::default();
25183        __struct.param_value = buf.get_f32_le()?;
25184        __struct.param_count = buf.get_u16_le()?;
25185        __struct.param_index = buf.get_u16_le()?;
25186        let mut tmp = [0_u8; 16usize];
25187        for v in &mut tmp {
25188            *v = buf.get_u8()?;
25189        }
25190        __struct.param_id = CharArray::new(tmp);
25191        let tmp = buf.get_u8()?;
25192        __struct.param_type =
25193            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25194                enum_type: "MavParamType",
25195                value: tmp as u64,
25196            })?;
25197        Ok(__struct)
25198    }
25199    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25200        let mut __tmp = BytesMut::new(bytes);
25201        #[allow(clippy::absurd_extreme_comparisons)]
25202        #[allow(unused_comparisons)]
25203        if __tmp.remaining() < Self::ENCODED_LEN {
25204            panic!(
25205                "buffer is too small (need {} bytes, but got {})",
25206                Self::ENCODED_LEN,
25207                __tmp.remaining(),
25208            )
25209        }
25210        __tmp.put_f32_le(self.param_value);
25211        __tmp.put_u16_le(self.param_count);
25212        __tmp.put_u16_le(self.param_index);
25213        for val in &self.param_id {
25214            __tmp.put_u8(*val);
25215        }
25216        __tmp.put_u8(self.param_type as u8);
25217        if matches!(version, MavlinkVersion::V2) {
25218            let len = __tmp.len();
25219            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25220        } else {
25221            __tmp.len()
25222        }
25223    }
25224}
25225#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
25226#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
25227#[doc = ""]
25228#[doc = "ID: 4"]
25229#[derive(Debug, Clone, PartialEq)]
25230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25232#[cfg_attr(feature = "ts", derive(TS))]
25233#[cfg_attr(feature = "ts", ts(export))]
25234pub struct PING_DATA {
25235    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25236    pub time_usec: u64,
25237    #[doc = "PING sequence"]
25238    pub seq: u32,
25239    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
25240    pub target_system: u8,
25241    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
25242    pub target_component: u8,
25243}
25244impl PING_DATA {
25245    pub const ENCODED_LEN: usize = 14usize;
25246    pub const DEFAULT: Self = Self {
25247        time_usec: 0_u64,
25248        seq: 0_u32,
25249        target_system: 0_u8,
25250        target_component: 0_u8,
25251    };
25252    #[cfg(feature = "arbitrary")]
25253    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25254        use arbitrary::{Arbitrary, Unstructured};
25255        let mut buf = [0u8; 1024];
25256        rng.fill_bytes(&mut buf);
25257        let mut unstructured = Unstructured::new(&buf);
25258        Self::arbitrary(&mut unstructured).unwrap_or_default()
25259    }
25260}
25261impl Default for PING_DATA {
25262    fn default() -> Self {
25263        Self::DEFAULT.clone()
25264    }
25265}
25266impl MessageData for PING_DATA {
25267    type Message = MavMessage;
25268    const ID: u32 = 4u32;
25269    const NAME: &'static str = "PING";
25270    const EXTRA_CRC: u8 = 237u8;
25271    const ENCODED_LEN: usize = 14usize;
25272    fn deser(
25273        _version: MavlinkVersion,
25274        __input: &[u8],
25275    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25276        let avail_len = __input.len();
25277        let mut payload_buf = [0; Self::ENCODED_LEN];
25278        let mut buf = if avail_len < Self::ENCODED_LEN {
25279            payload_buf[0..avail_len].copy_from_slice(__input);
25280            Bytes::new(&payload_buf)
25281        } else {
25282            Bytes::new(__input)
25283        };
25284        let mut __struct = Self::default();
25285        __struct.time_usec = buf.get_u64_le()?;
25286        __struct.seq = buf.get_u32_le()?;
25287        __struct.target_system = buf.get_u8()?;
25288        __struct.target_component = buf.get_u8()?;
25289        Ok(__struct)
25290    }
25291    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25292        let mut __tmp = BytesMut::new(bytes);
25293        #[allow(clippy::absurd_extreme_comparisons)]
25294        #[allow(unused_comparisons)]
25295        if __tmp.remaining() < Self::ENCODED_LEN {
25296            panic!(
25297                "buffer is too small (need {} bytes, but got {})",
25298                Self::ENCODED_LEN,
25299                __tmp.remaining(),
25300            )
25301        }
25302        __tmp.put_u64_le(self.time_usec);
25303        __tmp.put_u32_le(self.seq);
25304        __tmp.put_u8(self.target_system);
25305        __tmp.put_u8(self.target_component);
25306        if matches!(version, MavlinkVersion::V2) {
25307            let len = __tmp.len();
25308            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25309        } else {
25310            __tmp.len()
25311        }
25312    }
25313}
25314#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
25315#[doc = "Control vehicle tone generation (buzzer)."]
25316#[doc = ""]
25317#[doc = "ID: 258"]
25318#[derive(Debug, Clone, PartialEq)]
25319#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25320#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25321#[cfg_attr(feature = "ts", derive(TS))]
25322#[cfg_attr(feature = "ts", ts(export))]
25323pub struct PLAY_TUNE_DATA {
25324    #[doc = "System ID"]
25325    pub target_system: u8,
25326    #[doc = "Component ID"]
25327    pub target_component: u8,
25328    #[doc = "tune in board specific format"]
25329    #[cfg_attr(feature = "ts", ts(type = "string"))]
25330    pub tune: CharArray<30>,
25331    #[doc = "tune extension (appended to tune)"]
25332    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25333    #[cfg_attr(feature = "ts", ts(type = "string"))]
25334    pub tune2: CharArray<200>,
25335}
25336impl PLAY_TUNE_DATA {
25337    pub const ENCODED_LEN: usize = 232usize;
25338    pub const DEFAULT: Self = Self {
25339        target_system: 0_u8,
25340        target_component: 0_u8,
25341        tune: CharArray::new([0_u8; 30usize]),
25342        tune2: CharArray::new([0_u8; 200usize]),
25343    };
25344    #[cfg(feature = "arbitrary")]
25345    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25346        use arbitrary::{Arbitrary, Unstructured};
25347        let mut buf = [0u8; 1024];
25348        rng.fill_bytes(&mut buf);
25349        let mut unstructured = Unstructured::new(&buf);
25350        Self::arbitrary(&mut unstructured).unwrap_or_default()
25351    }
25352}
25353impl Default for PLAY_TUNE_DATA {
25354    fn default() -> Self {
25355        Self::DEFAULT.clone()
25356    }
25357}
25358impl MessageData for PLAY_TUNE_DATA {
25359    type Message = MavMessage;
25360    const ID: u32 = 258u32;
25361    const NAME: &'static str = "PLAY_TUNE";
25362    const EXTRA_CRC: u8 = 187u8;
25363    const ENCODED_LEN: usize = 232usize;
25364    fn deser(
25365        _version: MavlinkVersion,
25366        __input: &[u8],
25367    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25368        let avail_len = __input.len();
25369        let mut payload_buf = [0; Self::ENCODED_LEN];
25370        let mut buf = if avail_len < Self::ENCODED_LEN {
25371            payload_buf[0..avail_len].copy_from_slice(__input);
25372            Bytes::new(&payload_buf)
25373        } else {
25374            Bytes::new(__input)
25375        };
25376        let mut __struct = Self::default();
25377        __struct.target_system = buf.get_u8()?;
25378        __struct.target_component = buf.get_u8()?;
25379        let mut tmp = [0_u8; 30usize];
25380        for v in &mut tmp {
25381            *v = buf.get_u8()?;
25382        }
25383        __struct.tune = CharArray::new(tmp);
25384        let mut tmp = [0_u8; 200usize];
25385        for v in &mut tmp {
25386            *v = buf.get_u8()?;
25387        }
25388        __struct.tune2 = CharArray::new(tmp);
25389        Ok(__struct)
25390    }
25391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25392        let mut __tmp = BytesMut::new(bytes);
25393        #[allow(clippy::absurd_extreme_comparisons)]
25394        #[allow(unused_comparisons)]
25395        if __tmp.remaining() < Self::ENCODED_LEN {
25396            panic!(
25397                "buffer is too small (need {} bytes, but got {})",
25398                Self::ENCODED_LEN,
25399                __tmp.remaining(),
25400            )
25401        }
25402        __tmp.put_u8(self.target_system);
25403        __tmp.put_u8(self.target_component);
25404        for val in &self.tune {
25405            __tmp.put_u8(*val);
25406        }
25407        if matches!(version, MavlinkVersion::V2) {
25408            for val in &self.tune2 {
25409                __tmp.put_u8(*val);
25410            }
25411            let len = __tmp.len();
25412            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25413        } else {
25414            __tmp.len()
25415        }
25416    }
25417}
25418#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
25419#[doc = ""]
25420#[doc = "ID: 400"]
25421#[derive(Debug, Clone, PartialEq)]
25422#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25424#[cfg_attr(feature = "ts", derive(TS))]
25425#[cfg_attr(feature = "ts", ts(export))]
25426pub struct PLAY_TUNE_V2_DATA {
25427    #[doc = "Tune format"]
25428    pub format: TuneFormat,
25429    #[doc = "System ID"]
25430    pub target_system: u8,
25431    #[doc = "Component ID"]
25432    pub target_component: u8,
25433    #[doc = "Tune definition as a NULL-terminated string."]
25434    #[cfg_attr(feature = "ts", ts(type = "string"))]
25435    pub tune: CharArray<248>,
25436}
25437impl PLAY_TUNE_V2_DATA {
25438    pub const ENCODED_LEN: usize = 254usize;
25439    pub const DEFAULT: Self = Self {
25440        format: TuneFormat::DEFAULT,
25441        target_system: 0_u8,
25442        target_component: 0_u8,
25443        tune: CharArray::new([0_u8; 248usize]),
25444    };
25445    #[cfg(feature = "arbitrary")]
25446    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25447        use arbitrary::{Arbitrary, Unstructured};
25448        let mut buf = [0u8; 1024];
25449        rng.fill_bytes(&mut buf);
25450        let mut unstructured = Unstructured::new(&buf);
25451        Self::arbitrary(&mut unstructured).unwrap_or_default()
25452    }
25453}
25454impl Default for PLAY_TUNE_V2_DATA {
25455    fn default() -> Self {
25456        Self::DEFAULT.clone()
25457    }
25458}
25459impl MessageData for PLAY_TUNE_V2_DATA {
25460    type Message = MavMessage;
25461    const ID: u32 = 400u32;
25462    const NAME: &'static str = "PLAY_TUNE_V2";
25463    const EXTRA_CRC: u8 = 110u8;
25464    const ENCODED_LEN: usize = 254usize;
25465    fn deser(
25466        _version: MavlinkVersion,
25467        __input: &[u8],
25468    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25469        let avail_len = __input.len();
25470        let mut payload_buf = [0; Self::ENCODED_LEN];
25471        let mut buf = if avail_len < Self::ENCODED_LEN {
25472            payload_buf[0..avail_len].copy_from_slice(__input);
25473            Bytes::new(&payload_buf)
25474        } else {
25475            Bytes::new(__input)
25476        };
25477        let mut __struct = Self::default();
25478        let tmp = buf.get_u32_le()?;
25479        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
25480            ::mavlink_core::error::ParserError::InvalidEnum {
25481                enum_type: "TuneFormat",
25482                value: tmp as u64,
25483            },
25484        )?;
25485        __struct.target_system = buf.get_u8()?;
25486        __struct.target_component = buf.get_u8()?;
25487        let mut tmp = [0_u8; 248usize];
25488        for v in &mut tmp {
25489            *v = buf.get_u8()?;
25490        }
25491        __struct.tune = CharArray::new(tmp);
25492        Ok(__struct)
25493    }
25494    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25495        let mut __tmp = BytesMut::new(bytes);
25496        #[allow(clippy::absurd_extreme_comparisons)]
25497        #[allow(unused_comparisons)]
25498        if __tmp.remaining() < Self::ENCODED_LEN {
25499            panic!(
25500                "buffer is too small (need {} bytes, but got {})",
25501                Self::ENCODED_LEN,
25502                __tmp.remaining(),
25503            )
25504        }
25505        __tmp.put_u32_le(self.format as u32);
25506        __tmp.put_u8(self.target_system);
25507        __tmp.put_u8(self.target_component);
25508        for val in &self.tune {
25509            __tmp.put_u8(*val);
25510        }
25511        if matches!(version, MavlinkVersion::V2) {
25512            let len = __tmp.len();
25513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25514        } else {
25515            __tmp.len()
25516        }
25517    }
25518}
25519#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
25520#[doc = ""]
25521#[doc = "ID: 87"]
25522#[derive(Debug, Clone, PartialEq)]
25523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25525#[cfg_attr(feature = "ts", derive(TS))]
25526#[cfg_attr(feature = "ts", ts(export))]
25527pub struct POSITION_TARGET_GLOBAL_INT_DATA {
25528    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
25529    pub time_boot_ms: u32,
25530    #[doc = "Latitude in WGS84 frame"]
25531    pub lat_int: i32,
25532    #[doc = "Longitude in WGS84 frame"]
25533    pub lon_int: i32,
25534    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
25535    pub alt: f32,
25536    #[doc = "X velocity in NED frame"]
25537    pub vx: f32,
25538    #[doc = "Y velocity in NED frame"]
25539    pub vy: f32,
25540    #[doc = "Z velocity in NED frame"]
25541    pub vz: f32,
25542    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25543    pub afx: f32,
25544    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25545    pub afy: f32,
25546    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25547    pub afz: f32,
25548    #[doc = "yaw setpoint"]
25549    pub yaw: f32,
25550    #[doc = "yaw rate setpoint"]
25551    pub yaw_rate: f32,
25552    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25553    pub type_mask: PositionTargetTypemask,
25554    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
25555    pub coordinate_frame: MavFrame,
25556}
25557impl POSITION_TARGET_GLOBAL_INT_DATA {
25558    pub const ENCODED_LEN: usize = 51usize;
25559    pub const DEFAULT: Self = Self {
25560        time_boot_ms: 0_u32,
25561        lat_int: 0_i32,
25562        lon_int: 0_i32,
25563        alt: 0.0_f32,
25564        vx: 0.0_f32,
25565        vy: 0.0_f32,
25566        vz: 0.0_f32,
25567        afx: 0.0_f32,
25568        afy: 0.0_f32,
25569        afz: 0.0_f32,
25570        yaw: 0.0_f32,
25571        yaw_rate: 0.0_f32,
25572        type_mask: PositionTargetTypemask::DEFAULT,
25573        coordinate_frame: MavFrame::DEFAULT,
25574    };
25575    #[cfg(feature = "arbitrary")]
25576    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25577        use arbitrary::{Arbitrary, Unstructured};
25578        let mut buf = [0u8; 1024];
25579        rng.fill_bytes(&mut buf);
25580        let mut unstructured = Unstructured::new(&buf);
25581        Self::arbitrary(&mut unstructured).unwrap_or_default()
25582    }
25583}
25584impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
25585    fn default() -> Self {
25586        Self::DEFAULT.clone()
25587    }
25588}
25589impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
25590    type Message = MavMessage;
25591    const ID: u32 = 87u32;
25592    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
25593    const EXTRA_CRC: u8 = 150u8;
25594    const ENCODED_LEN: usize = 51usize;
25595    fn deser(
25596        _version: MavlinkVersion,
25597        __input: &[u8],
25598    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25599        let avail_len = __input.len();
25600        let mut payload_buf = [0; Self::ENCODED_LEN];
25601        let mut buf = if avail_len < Self::ENCODED_LEN {
25602            payload_buf[0..avail_len].copy_from_slice(__input);
25603            Bytes::new(&payload_buf)
25604        } else {
25605            Bytes::new(__input)
25606        };
25607        let mut __struct = Self::default();
25608        __struct.time_boot_ms = buf.get_u32_le()?;
25609        __struct.lat_int = buf.get_i32_le()?;
25610        __struct.lon_int = buf.get_i32_le()?;
25611        __struct.alt = buf.get_f32_le()?;
25612        __struct.vx = buf.get_f32_le()?;
25613        __struct.vy = buf.get_f32_le()?;
25614        __struct.vz = buf.get_f32_le()?;
25615        __struct.afx = buf.get_f32_le()?;
25616        __struct.afy = buf.get_f32_le()?;
25617        __struct.afz = buf.get_f32_le()?;
25618        __struct.yaw = buf.get_f32_le()?;
25619        __struct.yaw_rate = buf.get_f32_le()?;
25620        let tmp = buf.get_u16_le()?;
25621        __struct.type_mask =
25622            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
25623                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25624                    flag_type: "PositionTargetTypemask",
25625                    value: tmp as u64,
25626                })?;
25627        let tmp = buf.get_u8()?;
25628        __struct.coordinate_frame =
25629            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25630                enum_type: "MavFrame",
25631                value: tmp as u64,
25632            })?;
25633        Ok(__struct)
25634    }
25635    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25636        let mut __tmp = BytesMut::new(bytes);
25637        #[allow(clippy::absurd_extreme_comparisons)]
25638        #[allow(unused_comparisons)]
25639        if __tmp.remaining() < Self::ENCODED_LEN {
25640            panic!(
25641                "buffer is too small (need {} bytes, but got {})",
25642                Self::ENCODED_LEN,
25643                __tmp.remaining(),
25644            )
25645        }
25646        __tmp.put_u32_le(self.time_boot_ms);
25647        __tmp.put_i32_le(self.lat_int);
25648        __tmp.put_i32_le(self.lon_int);
25649        __tmp.put_f32_le(self.alt);
25650        __tmp.put_f32_le(self.vx);
25651        __tmp.put_f32_le(self.vy);
25652        __tmp.put_f32_le(self.vz);
25653        __tmp.put_f32_le(self.afx);
25654        __tmp.put_f32_le(self.afy);
25655        __tmp.put_f32_le(self.afz);
25656        __tmp.put_f32_le(self.yaw);
25657        __tmp.put_f32_le(self.yaw_rate);
25658        __tmp.put_u16_le(self.type_mask.bits() as u16);
25659        __tmp.put_u8(self.coordinate_frame as u8);
25660        if matches!(version, MavlinkVersion::V2) {
25661            let len = __tmp.len();
25662            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25663        } else {
25664            __tmp.len()
25665        }
25666    }
25667}
25668#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
25669#[doc = ""]
25670#[doc = "ID: 85"]
25671#[derive(Debug, Clone, PartialEq)]
25672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25674#[cfg_attr(feature = "ts", derive(TS))]
25675#[cfg_attr(feature = "ts", ts(export))]
25676pub struct POSITION_TARGET_LOCAL_NED_DATA {
25677    #[doc = "Timestamp (time since system boot)."]
25678    pub time_boot_ms: u32,
25679    #[doc = "X Position in NED frame"]
25680    pub x: f32,
25681    #[doc = "Y Position in NED frame"]
25682    pub y: f32,
25683    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
25684    pub z: f32,
25685    #[doc = "X velocity in NED frame"]
25686    pub vx: f32,
25687    #[doc = "Y velocity in NED frame"]
25688    pub vy: f32,
25689    #[doc = "Z velocity in NED frame"]
25690    pub vz: f32,
25691    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25692    pub afx: f32,
25693    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25694    pub afy: f32,
25695    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25696    pub afz: f32,
25697    #[doc = "yaw setpoint"]
25698    pub yaw: f32,
25699    #[doc = "yaw rate setpoint"]
25700    pub yaw_rate: f32,
25701    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25702    pub type_mask: PositionTargetTypemask,
25703    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
25704    pub coordinate_frame: MavFrame,
25705}
25706impl POSITION_TARGET_LOCAL_NED_DATA {
25707    pub const ENCODED_LEN: usize = 51usize;
25708    pub const DEFAULT: Self = Self {
25709        time_boot_ms: 0_u32,
25710        x: 0.0_f32,
25711        y: 0.0_f32,
25712        z: 0.0_f32,
25713        vx: 0.0_f32,
25714        vy: 0.0_f32,
25715        vz: 0.0_f32,
25716        afx: 0.0_f32,
25717        afy: 0.0_f32,
25718        afz: 0.0_f32,
25719        yaw: 0.0_f32,
25720        yaw_rate: 0.0_f32,
25721        type_mask: PositionTargetTypemask::DEFAULT,
25722        coordinate_frame: MavFrame::DEFAULT,
25723    };
25724    #[cfg(feature = "arbitrary")]
25725    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25726        use arbitrary::{Arbitrary, Unstructured};
25727        let mut buf = [0u8; 1024];
25728        rng.fill_bytes(&mut buf);
25729        let mut unstructured = Unstructured::new(&buf);
25730        Self::arbitrary(&mut unstructured).unwrap_or_default()
25731    }
25732}
25733impl Default for POSITION_TARGET_LOCAL_NED_DATA {
25734    fn default() -> Self {
25735        Self::DEFAULT.clone()
25736    }
25737}
25738impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
25739    type Message = MavMessage;
25740    const ID: u32 = 85u32;
25741    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
25742    const EXTRA_CRC: u8 = 140u8;
25743    const ENCODED_LEN: usize = 51usize;
25744    fn deser(
25745        _version: MavlinkVersion,
25746        __input: &[u8],
25747    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25748        let avail_len = __input.len();
25749        let mut payload_buf = [0; Self::ENCODED_LEN];
25750        let mut buf = if avail_len < Self::ENCODED_LEN {
25751            payload_buf[0..avail_len].copy_from_slice(__input);
25752            Bytes::new(&payload_buf)
25753        } else {
25754            Bytes::new(__input)
25755        };
25756        let mut __struct = Self::default();
25757        __struct.time_boot_ms = buf.get_u32_le()?;
25758        __struct.x = buf.get_f32_le()?;
25759        __struct.y = buf.get_f32_le()?;
25760        __struct.z = buf.get_f32_le()?;
25761        __struct.vx = buf.get_f32_le()?;
25762        __struct.vy = buf.get_f32_le()?;
25763        __struct.vz = buf.get_f32_le()?;
25764        __struct.afx = buf.get_f32_le()?;
25765        __struct.afy = buf.get_f32_le()?;
25766        __struct.afz = buf.get_f32_le()?;
25767        __struct.yaw = buf.get_f32_le()?;
25768        __struct.yaw_rate = buf.get_f32_le()?;
25769        let tmp = buf.get_u16_le()?;
25770        __struct.type_mask =
25771            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
25772                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25773                    flag_type: "PositionTargetTypemask",
25774                    value: tmp as u64,
25775                })?;
25776        let tmp = buf.get_u8()?;
25777        __struct.coordinate_frame =
25778            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25779                enum_type: "MavFrame",
25780                value: tmp as u64,
25781            })?;
25782        Ok(__struct)
25783    }
25784    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25785        let mut __tmp = BytesMut::new(bytes);
25786        #[allow(clippy::absurd_extreme_comparisons)]
25787        #[allow(unused_comparisons)]
25788        if __tmp.remaining() < Self::ENCODED_LEN {
25789            panic!(
25790                "buffer is too small (need {} bytes, but got {})",
25791                Self::ENCODED_LEN,
25792                __tmp.remaining(),
25793            )
25794        }
25795        __tmp.put_u32_le(self.time_boot_ms);
25796        __tmp.put_f32_le(self.x);
25797        __tmp.put_f32_le(self.y);
25798        __tmp.put_f32_le(self.z);
25799        __tmp.put_f32_le(self.vx);
25800        __tmp.put_f32_le(self.vy);
25801        __tmp.put_f32_le(self.vz);
25802        __tmp.put_f32_le(self.afx);
25803        __tmp.put_f32_le(self.afy);
25804        __tmp.put_f32_le(self.afz);
25805        __tmp.put_f32_le(self.yaw);
25806        __tmp.put_f32_le(self.yaw_rate);
25807        __tmp.put_u16_le(self.type_mask.bits() as u16);
25808        __tmp.put_u8(self.coordinate_frame as u8);
25809        if matches!(version, MavlinkVersion::V2) {
25810            let len = __tmp.len();
25811            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25812        } else {
25813            __tmp.len()
25814        }
25815    }
25816}
25817#[doc = "Power supply status."]
25818#[doc = ""]
25819#[doc = "ID: 125"]
25820#[derive(Debug, Clone, PartialEq)]
25821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25823#[cfg_attr(feature = "ts", derive(TS))]
25824#[cfg_attr(feature = "ts", ts(export))]
25825pub struct POWER_STATUS_DATA {
25826    #[doc = "5V rail voltage."]
25827    pub Vcc: u16,
25828    #[doc = "Servo rail voltage."]
25829    pub Vservo: u16,
25830    #[doc = "Bitmap of power supply status flags."]
25831    pub flags: MavPowerStatus,
25832}
25833impl POWER_STATUS_DATA {
25834    pub const ENCODED_LEN: usize = 6usize;
25835    pub const DEFAULT: Self = Self {
25836        Vcc: 0_u16,
25837        Vservo: 0_u16,
25838        flags: MavPowerStatus::DEFAULT,
25839    };
25840    #[cfg(feature = "arbitrary")]
25841    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25842        use arbitrary::{Arbitrary, Unstructured};
25843        let mut buf = [0u8; 1024];
25844        rng.fill_bytes(&mut buf);
25845        let mut unstructured = Unstructured::new(&buf);
25846        Self::arbitrary(&mut unstructured).unwrap_or_default()
25847    }
25848}
25849impl Default for POWER_STATUS_DATA {
25850    fn default() -> Self {
25851        Self::DEFAULT.clone()
25852    }
25853}
25854impl MessageData for POWER_STATUS_DATA {
25855    type Message = MavMessage;
25856    const ID: u32 = 125u32;
25857    const NAME: &'static str = "POWER_STATUS";
25858    const EXTRA_CRC: u8 = 203u8;
25859    const ENCODED_LEN: usize = 6usize;
25860    fn deser(
25861        _version: MavlinkVersion,
25862        __input: &[u8],
25863    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25864        let avail_len = __input.len();
25865        let mut payload_buf = [0; Self::ENCODED_LEN];
25866        let mut buf = if avail_len < Self::ENCODED_LEN {
25867            payload_buf[0..avail_len].copy_from_slice(__input);
25868            Bytes::new(&payload_buf)
25869        } else {
25870            Bytes::new(__input)
25871        };
25872        let mut __struct = Self::default();
25873        __struct.Vcc = buf.get_u16_le()?;
25874        __struct.Vservo = buf.get_u16_le()?;
25875        let tmp = buf.get_u16_le()?;
25876        __struct.flags = MavPowerStatus::from_bits(tmp as <MavPowerStatus as Flags>::Bits).ok_or(
25877            ::mavlink_core::error::ParserError::InvalidFlag {
25878                flag_type: "MavPowerStatus",
25879                value: tmp as u64,
25880            },
25881        )?;
25882        Ok(__struct)
25883    }
25884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25885        let mut __tmp = BytesMut::new(bytes);
25886        #[allow(clippy::absurd_extreme_comparisons)]
25887        #[allow(unused_comparisons)]
25888        if __tmp.remaining() < Self::ENCODED_LEN {
25889            panic!(
25890                "buffer is too small (need {} bytes, but got {})",
25891                Self::ENCODED_LEN,
25892                __tmp.remaining(),
25893            )
25894        }
25895        __tmp.put_u16_le(self.Vcc);
25896        __tmp.put_u16_le(self.Vservo);
25897        __tmp.put_u16_le(self.flags.bits() as u16);
25898        if matches!(version, MavlinkVersion::V2) {
25899            let len = __tmp.len();
25900            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25901        } else {
25902            __tmp.len()
25903        }
25904    }
25905}
25906#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25907#[doc = ""]
25908#[doc = "ID: 300"]
25909#[derive(Debug, Clone, PartialEq)]
25910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25911#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25912#[cfg_attr(feature = "ts", derive(TS))]
25913#[cfg_attr(feature = "ts", ts(export))]
25914pub struct PROTOCOL_VERSION_DATA {
25915    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25916    pub version: u16,
25917    #[doc = "Minimum MAVLink version supported"]
25918    pub min_version: u16,
25919    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25920    pub max_version: u16,
25921    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25922    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25923    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25924    pub spec_version_hash: [u8; 8],
25925    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25926    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25927    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25928    pub library_version_hash: [u8; 8],
25929}
25930impl PROTOCOL_VERSION_DATA {
25931    pub const ENCODED_LEN: usize = 22usize;
25932    pub const DEFAULT: Self = Self {
25933        version: 0_u16,
25934        min_version: 0_u16,
25935        max_version: 0_u16,
25936        spec_version_hash: [0_u8; 8usize],
25937        library_version_hash: [0_u8; 8usize],
25938    };
25939    #[cfg(feature = "arbitrary")]
25940    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25941        use arbitrary::{Arbitrary, Unstructured};
25942        let mut buf = [0u8; 1024];
25943        rng.fill_bytes(&mut buf);
25944        let mut unstructured = Unstructured::new(&buf);
25945        Self::arbitrary(&mut unstructured).unwrap_or_default()
25946    }
25947}
25948impl Default for PROTOCOL_VERSION_DATA {
25949    fn default() -> Self {
25950        Self::DEFAULT.clone()
25951    }
25952}
25953impl MessageData for PROTOCOL_VERSION_DATA {
25954    type Message = MavMessage;
25955    const ID: u32 = 300u32;
25956    const NAME: &'static str = "PROTOCOL_VERSION";
25957    const EXTRA_CRC: u8 = 217u8;
25958    const ENCODED_LEN: usize = 22usize;
25959    fn deser(
25960        _version: MavlinkVersion,
25961        __input: &[u8],
25962    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25963        let avail_len = __input.len();
25964        let mut payload_buf = [0; Self::ENCODED_LEN];
25965        let mut buf = if avail_len < Self::ENCODED_LEN {
25966            payload_buf[0..avail_len].copy_from_slice(__input);
25967            Bytes::new(&payload_buf)
25968        } else {
25969            Bytes::new(__input)
25970        };
25971        let mut __struct = Self::default();
25972        __struct.version = buf.get_u16_le()?;
25973        __struct.min_version = buf.get_u16_le()?;
25974        __struct.max_version = buf.get_u16_le()?;
25975        for v in &mut __struct.spec_version_hash {
25976            let val = buf.get_u8()?;
25977            *v = val;
25978        }
25979        for v in &mut __struct.library_version_hash {
25980            let val = buf.get_u8()?;
25981            *v = val;
25982        }
25983        Ok(__struct)
25984    }
25985    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25986        let mut __tmp = BytesMut::new(bytes);
25987        #[allow(clippy::absurd_extreme_comparisons)]
25988        #[allow(unused_comparisons)]
25989        if __tmp.remaining() < Self::ENCODED_LEN {
25990            panic!(
25991                "buffer is too small (need {} bytes, but got {})",
25992                Self::ENCODED_LEN,
25993                __tmp.remaining(),
25994            )
25995        }
25996        __tmp.put_u16_le(self.version);
25997        __tmp.put_u16_le(self.min_version);
25998        __tmp.put_u16_le(self.max_version);
25999        for val in &self.spec_version_hash {
26000            __tmp.put_u8(*val);
26001        }
26002        for val in &self.library_version_hash {
26003            __tmp.put_u8(*val);
26004        }
26005        if matches!(version, MavlinkVersion::V2) {
26006            let len = __tmp.len();
26007            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26008        } else {
26009            __tmp.len()
26010        }
26011    }
26012}
26013#[doc = "Status generated by radio and injected into MAVLink stream."]
26014#[doc = ""]
26015#[doc = "ID: 109"]
26016#[derive(Debug, Clone, PartialEq)]
26017#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26018#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26019#[cfg_attr(feature = "ts", derive(TS))]
26020#[cfg_attr(feature = "ts", ts(export))]
26021pub struct RADIO_STATUS_DATA {
26022    #[doc = "Count of radio packet receive errors (since boot)."]
26023    pub rxerrors: u16,
26024    #[doc = "Count of error corrected radio packets (since boot)."]
26025    pub fixed: u16,
26026    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26027    pub rssi: u8,
26028    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26029    pub remrssi: u8,
26030    #[doc = "Remaining free transmitter buffer space."]
26031    pub txbuf: u8,
26032    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
26033    pub noise: u8,
26034    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
26035    pub remnoise: u8,
26036}
26037impl RADIO_STATUS_DATA {
26038    pub const ENCODED_LEN: usize = 9usize;
26039    pub const DEFAULT: Self = Self {
26040        rxerrors: 0_u16,
26041        fixed: 0_u16,
26042        rssi: 0_u8,
26043        remrssi: 0_u8,
26044        txbuf: 0_u8,
26045        noise: 0_u8,
26046        remnoise: 0_u8,
26047    };
26048    #[cfg(feature = "arbitrary")]
26049    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26050        use arbitrary::{Arbitrary, Unstructured};
26051        let mut buf = [0u8; 1024];
26052        rng.fill_bytes(&mut buf);
26053        let mut unstructured = Unstructured::new(&buf);
26054        Self::arbitrary(&mut unstructured).unwrap_or_default()
26055    }
26056}
26057impl Default for RADIO_STATUS_DATA {
26058    fn default() -> Self {
26059        Self::DEFAULT.clone()
26060    }
26061}
26062impl MessageData for RADIO_STATUS_DATA {
26063    type Message = MavMessage;
26064    const ID: u32 = 109u32;
26065    const NAME: &'static str = "RADIO_STATUS";
26066    const EXTRA_CRC: u8 = 185u8;
26067    const ENCODED_LEN: usize = 9usize;
26068    fn deser(
26069        _version: MavlinkVersion,
26070        __input: &[u8],
26071    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26072        let avail_len = __input.len();
26073        let mut payload_buf = [0; Self::ENCODED_LEN];
26074        let mut buf = if avail_len < Self::ENCODED_LEN {
26075            payload_buf[0..avail_len].copy_from_slice(__input);
26076            Bytes::new(&payload_buf)
26077        } else {
26078            Bytes::new(__input)
26079        };
26080        let mut __struct = Self::default();
26081        __struct.rxerrors = buf.get_u16_le()?;
26082        __struct.fixed = buf.get_u16_le()?;
26083        __struct.rssi = buf.get_u8()?;
26084        __struct.remrssi = buf.get_u8()?;
26085        __struct.txbuf = buf.get_u8()?;
26086        __struct.noise = buf.get_u8()?;
26087        __struct.remnoise = buf.get_u8()?;
26088        Ok(__struct)
26089    }
26090    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26091        let mut __tmp = BytesMut::new(bytes);
26092        #[allow(clippy::absurd_extreme_comparisons)]
26093        #[allow(unused_comparisons)]
26094        if __tmp.remaining() < Self::ENCODED_LEN {
26095            panic!(
26096                "buffer is too small (need {} bytes, but got {})",
26097                Self::ENCODED_LEN,
26098                __tmp.remaining(),
26099            )
26100        }
26101        __tmp.put_u16_le(self.rxerrors);
26102        __tmp.put_u16_le(self.fixed);
26103        __tmp.put_u8(self.rssi);
26104        __tmp.put_u8(self.remrssi);
26105        __tmp.put_u8(self.txbuf);
26106        __tmp.put_u8(self.noise);
26107        __tmp.put_u8(self.remnoise);
26108        if matches!(version, MavlinkVersion::V2) {
26109            let len = __tmp.len();
26110            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26111        } else {
26112            __tmp.len()
26113        }
26114    }
26115}
26116#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
26117#[doc = ""]
26118#[doc = "ID: 27"]
26119#[derive(Debug, Clone, PartialEq)]
26120#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26121#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26122#[cfg_attr(feature = "ts", derive(TS))]
26123#[cfg_attr(feature = "ts", ts(export))]
26124pub struct RAW_IMU_DATA {
26125    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26126    pub time_usec: u64,
26127    #[doc = "X acceleration (raw)"]
26128    pub xacc: i16,
26129    #[doc = "Y acceleration (raw)"]
26130    pub yacc: i16,
26131    #[doc = "Z acceleration (raw)"]
26132    pub zacc: i16,
26133    #[doc = "Angular speed around X axis (raw)"]
26134    pub xgyro: i16,
26135    #[doc = "Angular speed around Y axis (raw)"]
26136    pub ygyro: i16,
26137    #[doc = "Angular speed around Z axis (raw)"]
26138    pub zgyro: i16,
26139    #[doc = "X Magnetic field (raw)"]
26140    pub xmag: i16,
26141    #[doc = "Y Magnetic field (raw)"]
26142    pub ymag: i16,
26143    #[doc = "Z Magnetic field (raw)"]
26144    pub zmag: i16,
26145    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
26146    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26147    pub id: u8,
26148    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26149    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26150    pub temperature: i16,
26151}
26152impl RAW_IMU_DATA {
26153    pub const ENCODED_LEN: usize = 29usize;
26154    pub const DEFAULT: Self = Self {
26155        time_usec: 0_u64,
26156        xacc: 0_i16,
26157        yacc: 0_i16,
26158        zacc: 0_i16,
26159        xgyro: 0_i16,
26160        ygyro: 0_i16,
26161        zgyro: 0_i16,
26162        xmag: 0_i16,
26163        ymag: 0_i16,
26164        zmag: 0_i16,
26165        id: 0_u8,
26166        temperature: 0_i16,
26167    };
26168    #[cfg(feature = "arbitrary")]
26169    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26170        use arbitrary::{Arbitrary, Unstructured};
26171        let mut buf = [0u8; 1024];
26172        rng.fill_bytes(&mut buf);
26173        let mut unstructured = Unstructured::new(&buf);
26174        Self::arbitrary(&mut unstructured).unwrap_or_default()
26175    }
26176}
26177impl Default for RAW_IMU_DATA {
26178    fn default() -> Self {
26179        Self::DEFAULT.clone()
26180    }
26181}
26182impl MessageData for RAW_IMU_DATA {
26183    type Message = MavMessage;
26184    const ID: u32 = 27u32;
26185    const NAME: &'static str = "RAW_IMU";
26186    const EXTRA_CRC: u8 = 144u8;
26187    const ENCODED_LEN: usize = 29usize;
26188    fn deser(
26189        _version: MavlinkVersion,
26190        __input: &[u8],
26191    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26192        let avail_len = __input.len();
26193        let mut payload_buf = [0; Self::ENCODED_LEN];
26194        let mut buf = if avail_len < Self::ENCODED_LEN {
26195            payload_buf[0..avail_len].copy_from_slice(__input);
26196            Bytes::new(&payload_buf)
26197        } else {
26198            Bytes::new(__input)
26199        };
26200        let mut __struct = Self::default();
26201        __struct.time_usec = buf.get_u64_le()?;
26202        __struct.xacc = buf.get_i16_le()?;
26203        __struct.yacc = buf.get_i16_le()?;
26204        __struct.zacc = buf.get_i16_le()?;
26205        __struct.xgyro = buf.get_i16_le()?;
26206        __struct.ygyro = buf.get_i16_le()?;
26207        __struct.zgyro = buf.get_i16_le()?;
26208        __struct.xmag = buf.get_i16_le()?;
26209        __struct.ymag = buf.get_i16_le()?;
26210        __struct.zmag = buf.get_i16_le()?;
26211        __struct.id = buf.get_u8()?;
26212        __struct.temperature = buf.get_i16_le()?;
26213        Ok(__struct)
26214    }
26215    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26216        let mut __tmp = BytesMut::new(bytes);
26217        #[allow(clippy::absurd_extreme_comparisons)]
26218        #[allow(unused_comparisons)]
26219        if __tmp.remaining() < Self::ENCODED_LEN {
26220            panic!(
26221                "buffer is too small (need {} bytes, but got {})",
26222                Self::ENCODED_LEN,
26223                __tmp.remaining(),
26224            )
26225        }
26226        __tmp.put_u64_le(self.time_usec);
26227        __tmp.put_i16_le(self.xacc);
26228        __tmp.put_i16_le(self.yacc);
26229        __tmp.put_i16_le(self.zacc);
26230        __tmp.put_i16_le(self.xgyro);
26231        __tmp.put_i16_le(self.ygyro);
26232        __tmp.put_i16_le(self.zgyro);
26233        __tmp.put_i16_le(self.xmag);
26234        __tmp.put_i16_le(self.ymag);
26235        __tmp.put_i16_le(self.zmag);
26236        if matches!(version, MavlinkVersion::V2) {
26237            __tmp.put_u8(self.id);
26238            __tmp.put_i16_le(self.temperature);
26239            let len = __tmp.len();
26240            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26241        } else {
26242            __tmp.len()
26243        }
26244    }
26245}
26246#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
26247#[doc = ""]
26248#[doc = "ID: 28"]
26249#[derive(Debug, Clone, PartialEq)]
26250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26252#[cfg_attr(feature = "ts", derive(TS))]
26253#[cfg_attr(feature = "ts", ts(export))]
26254pub struct RAW_PRESSURE_DATA {
26255    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26256    pub time_usec: u64,
26257    #[doc = "Absolute pressure (raw)"]
26258    pub press_abs: i16,
26259    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
26260    pub press_diff1: i16,
26261    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
26262    pub press_diff2: i16,
26263    #[doc = "Raw Temperature measurement (raw)"]
26264    pub temperature: i16,
26265}
26266impl RAW_PRESSURE_DATA {
26267    pub const ENCODED_LEN: usize = 16usize;
26268    pub const DEFAULT: Self = Self {
26269        time_usec: 0_u64,
26270        press_abs: 0_i16,
26271        press_diff1: 0_i16,
26272        press_diff2: 0_i16,
26273        temperature: 0_i16,
26274    };
26275    #[cfg(feature = "arbitrary")]
26276    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26277        use arbitrary::{Arbitrary, Unstructured};
26278        let mut buf = [0u8; 1024];
26279        rng.fill_bytes(&mut buf);
26280        let mut unstructured = Unstructured::new(&buf);
26281        Self::arbitrary(&mut unstructured).unwrap_or_default()
26282    }
26283}
26284impl Default for RAW_PRESSURE_DATA {
26285    fn default() -> Self {
26286        Self::DEFAULT.clone()
26287    }
26288}
26289impl MessageData for RAW_PRESSURE_DATA {
26290    type Message = MavMessage;
26291    const ID: u32 = 28u32;
26292    const NAME: &'static str = "RAW_PRESSURE";
26293    const EXTRA_CRC: u8 = 67u8;
26294    const ENCODED_LEN: usize = 16usize;
26295    fn deser(
26296        _version: MavlinkVersion,
26297        __input: &[u8],
26298    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26299        let avail_len = __input.len();
26300        let mut payload_buf = [0; Self::ENCODED_LEN];
26301        let mut buf = if avail_len < Self::ENCODED_LEN {
26302            payload_buf[0..avail_len].copy_from_slice(__input);
26303            Bytes::new(&payload_buf)
26304        } else {
26305            Bytes::new(__input)
26306        };
26307        let mut __struct = Self::default();
26308        __struct.time_usec = buf.get_u64_le()?;
26309        __struct.press_abs = buf.get_i16_le()?;
26310        __struct.press_diff1 = buf.get_i16_le()?;
26311        __struct.press_diff2 = buf.get_i16_le()?;
26312        __struct.temperature = buf.get_i16_le()?;
26313        Ok(__struct)
26314    }
26315    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26316        let mut __tmp = BytesMut::new(bytes);
26317        #[allow(clippy::absurd_extreme_comparisons)]
26318        #[allow(unused_comparisons)]
26319        if __tmp.remaining() < Self::ENCODED_LEN {
26320            panic!(
26321                "buffer is too small (need {} bytes, but got {})",
26322                Self::ENCODED_LEN,
26323                __tmp.remaining(),
26324            )
26325        }
26326        __tmp.put_u64_le(self.time_usec);
26327        __tmp.put_i16_le(self.press_abs);
26328        __tmp.put_i16_le(self.press_diff1);
26329        __tmp.put_i16_le(self.press_diff2);
26330        __tmp.put_i16_le(self.temperature);
26331        if matches!(version, MavlinkVersion::V2) {
26332            let len = __tmp.len();
26333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26334        } else {
26335            __tmp.len()
26336        }
26337    }
26338}
26339#[doc = "RPM sensor data message."]
26340#[doc = ""]
26341#[doc = "ID: 339"]
26342#[derive(Debug, Clone, PartialEq)]
26343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26345#[cfg_attr(feature = "ts", derive(TS))]
26346#[cfg_attr(feature = "ts", ts(export))]
26347pub struct RAW_RPM_DATA {
26348    #[doc = "Indicated rate"]
26349    pub frequency: f32,
26350    #[doc = "Index of this RPM sensor (0-indexed)"]
26351    pub index: u8,
26352}
26353impl RAW_RPM_DATA {
26354    pub const ENCODED_LEN: usize = 5usize;
26355    pub const DEFAULT: Self = Self {
26356        frequency: 0.0_f32,
26357        index: 0_u8,
26358    };
26359    #[cfg(feature = "arbitrary")]
26360    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26361        use arbitrary::{Arbitrary, Unstructured};
26362        let mut buf = [0u8; 1024];
26363        rng.fill_bytes(&mut buf);
26364        let mut unstructured = Unstructured::new(&buf);
26365        Self::arbitrary(&mut unstructured).unwrap_or_default()
26366    }
26367}
26368impl Default for RAW_RPM_DATA {
26369    fn default() -> Self {
26370        Self::DEFAULT.clone()
26371    }
26372}
26373impl MessageData for RAW_RPM_DATA {
26374    type Message = MavMessage;
26375    const ID: u32 = 339u32;
26376    const NAME: &'static str = "RAW_RPM";
26377    const EXTRA_CRC: u8 = 199u8;
26378    const ENCODED_LEN: usize = 5usize;
26379    fn deser(
26380        _version: MavlinkVersion,
26381        __input: &[u8],
26382    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26383        let avail_len = __input.len();
26384        let mut payload_buf = [0; Self::ENCODED_LEN];
26385        let mut buf = if avail_len < Self::ENCODED_LEN {
26386            payload_buf[0..avail_len].copy_from_slice(__input);
26387            Bytes::new(&payload_buf)
26388        } else {
26389            Bytes::new(__input)
26390        };
26391        let mut __struct = Self::default();
26392        __struct.frequency = buf.get_f32_le()?;
26393        __struct.index = buf.get_u8()?;
26394        Ok(__struct)
26395    }
26396    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26397        let mut __tmp = BytesMut::new(bytes);
26398        #[allow(clippy::absurd_extreme_comparisons)]
26399        #[allow(unused_comparisons)]
26400        if __tmp.remaining() < Self::ENCODED_LEN {
26401            panic!(
26402                "buffer is too small (need {} bytes, but got {})",
26403                Self::ENCODED_LEN,
26404                __tmp.remaining(),
26405            )
26406        }
26407        __tmp.put_f32_le(self.frequency);
26408        __tmp.put_u8(self.index);
26409        if matches!(version, MavlinkVersion::V2) {
26410            let len = __tmp.len();
26411            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26412        } else {
26413            __tmp.len()
26414        }
26415    }
26416}
26417#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26418#[doc = ""]
26419#[doc = "ID: 65"]
26420#[derive(Debug, Clone, PartialEq)]
26421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26423#[cfg_attr(feature = "ts", derive(TS))]
26424#[cfg_attr(feature = "ts", ts(export))]
26425pub struct RC_CHANNELS_DATA {
26426    #[doc = "Timestamp (time since system boot)."]
26427    pub time_boot_ms: u32,
26428    #[doc = "RC channel 1 value."]
26429    pub chan1_raw: u16,
26430    #[doc = "RC channel 2 value."]
26431    pub chan2_raw: u16,
26432    #[doc = "RC channel 3 value."]
26433    pub chan3_raw: u16,
26434    #[doc = "RC channel 4 value."]
26435    pub chan4_raw: u16,
26436    #[doc = "RC channel 5 value."]
26437    pub chan5_raw: u16,
26438    #[doc = "RC channel 6 value."]
26439    pub chan6_raw: u16,
26440    #[doc = "RC channel 7 value."]
26441    pub chan7_raw: u16,
26442    #[doc = "RC channel 8 value."]
26443    pub chan8_raw: u16,
26444    #[doc = "RC channel 9 value."]
26445    pub chan9_raw: u16,
26446    #[doc = "RC channel 10 value."]
26447    pub chan10_raw: u16,
26448    #[doc = "RC channel 11 value."]
26449    pub chan11_raw: u16,
26450    #[doc = "RC channel 12 value."]
26451    pub chan12_raw: u16,
26452    #[doc = "RC channel 13 value."]
26453    pub chan13_raw: u16,
26454    #[doc = "RC channel 14 value."]
26455    pub chan14_raw: u16,
26456    #[doc = "RC channel 15 value."]
26457    pub chan15_raw: u16,
26458    #[doc = "RC channel 16 value."]
26459    pub chan16_raw: u16,
26460    #[doc = "RC channel 17 value."]
26461    pub chan17_raw: u16,
26462    #[doc = "RC channel 18 value."]
26463    pub chan18_raw: u16,
26464    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
26465    pub chancount: u8,
26466    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26467    pub rssi: u8,
26468}
26469impl RC_CHANNELS_DATA {
26470    pub const ENCODED_LEN: usize = 42usize;
26471    pub const DEFAULT: Self = Self {
26472        time_boot_ms: 0_u32,
26473        chan1_raw: 0_u16,
26474        chan2_raw: 0_u16,
26475        chan3_raw: 0_u16,
26476        chan4_raw: 0_u16,
26477        chan5_raw: 0_u16,
26478        chan6_raw: 0_u16,
26479        chan7_raw: 0_u16,
26480        chan8_raw: 0_u16,
26481        chan9_raw: 0_u16,
26482        chan10_raw: 0_u16,
26483        chan11_raw: 0_u16,
26484        chan12_raw: 0_u16,
26485        chan13_raw: 0_u16,
26486        chan14_raw: 0_u16,
26487        chan15_raw: 0_u16,
26488        chan16_raw: 0_u16,
26489        chan17_raw: 0_u16,
26490        chan18_raw: 0_u16,
26491        chancount: 0_u8,
26492        rssi: 0_u8,
26493    };
26494    #[cfg(feature = "arbitrary")]
26495    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26496        use arbitrary::{Arbitrary, Unstructured};
26497        let mut buf = [0u8; 1024];
26498        rng.fill_bytes(&mut buf);
26499        let mut unstructured = Unstructured::new(&buf);
26500        Self::arbitrary(&mut unstructured).unwrap_or_default()
26501    }
26502}
26503impl Default for RC_CHANNELS_DATA {
26504    fn default() -> Self {
26505        Self::DEFAULT.clone()
26506    }
26507}
26508impl MessageData for RC_CHANNELS_DATA {
26509    type Message = MavMessage;
26510    const ID: u32 = 65u32;
26511    const NAME: &'static str = "RC_CHANNELS";
26512    const EXTRA_CRC: u8 = 118u8;
26513    const ENCODED_LEN: usize = 42usize;
26514    fn deser(
26515        _version: MavlinkVersion,
26516        __input: &[u8],
26517    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26518        let avail_len = __input.len();
26519        let mut payload_buf = [0; Self::ENCODED_LEN];
26520        let mut buf = if avail_len < Self::ENCODED_LEN {
26521            payload_buf[0..avail_len].copy_from_slice(__input);
26522            Bytes::new(&payload_buf)
26523        } else {
26524            Bytes::new(__input)
26525        };
26526        let mut __struct = Self::default();
26527        __struct.time_boot_ms = buf.get_u32_le()?;
26528        __struct.chan1_raw = buf.get_u16_le()?;
26529        __struct.chan2_raw = buf.get_u16_le()?;
26530        __struct.chan3_raw = buf.get_u16_le()?;
26531        __struct.chan4_raw = buf.get_u16_le()?;
26532        __struct.chan5_raw = buf.get_u16_le()?;
26533        __struct.chan6_raw = buf.get_u16_le()?;
26534        __struct.chan7_raw = buf.get_u16_le()?;
26535        __struct.chan8_raw = buf.get_u16_le()?;
26536        __struct.chan9_raw = buf.get_u16_le()?;
26537        __struct.chan10_raw = buf.get_u16_le()?;
26538        __struct.chan11_raw = buf.get_u16_le()?;
26539        __struct.chan12_raw = buf.get_u16_le()?;
26540        __struct.chan13_raw = buf.get_u16_le()?;
26541        __struct.chan14_raw = buf.get_u16_le()?;
26542        __struct.chan15_raw = buf.get_u16_le()?;
26543        __struct.chan16_raw = buf.get_u16_le()?;
26544        __struct.chan17_raw = buf.get_u16_le()?;
26545        __struct.chan18_raw = buf.get_u16_le()?;
26546        __struct.chancount = buf.get_u8()?;
26547        __struct.rssi = buf.get_u8()?;
26548        Ok(__struct)
26549    }
26550    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26551        let mut __tmp = BytesMut::new(bytes);
26552        #[allow(clippy::absurd_extreme_comparisons)]
26553        #[allow(unused_comparisons)]
26554        if __tmp.remaining() < Self::ENCODED_LEN {
26555            panic!(
26556                "buffer is too small (need {} bytes, but got {})",
26557                Self::ENCODED_LEN,
26558                __tmp.remaining(),
26559            )
26560        }
26561        __tmp.put_u32_le(self.time_boot_ms);
26562        __tmp.put_u16_le(self.chan1_raw);
26563        __tmp.put_u16_le(self.chan2_raw);
26564        __tmp.put_u16_le(self.chan3_raw);
26565        __tmp.put_u16_le(self.chan4_raw);
26566        __tmp.put_u16_le(self.chan5_raw);
26567        __tmp.put_u16_le(self.chan6_raw);
26568        __tmp.put_u16_le(self.chan7_raw);
26569        __tmp.put_u16_le(self.chan8_raw);
26570        __tmp.put_u16_le(self.chan9_raw);
26571        __tmp.put_u16_le(self.chan10_raw);
26572        __tmp.put_u16_le(self.chan11_raw);
26573        __tmp.put_u16_le(self.chan12_raw);
26574        __tmp.put_u16_le(self.chan13_raw);
26575        __tmp.put_u16_le(self.chan14_raw);
26576        __tmp.put_u16_le(self.chan15_raw);
26577        __tmp.put_u16_le(self.chan16_raw);
26578        __tmp.put_u16_le(self.chan17_raw);
26579        __tmp.put_u16_le(self.chan18_raw);
26580        __tmp.put_u8(self.chancount);
26581        __tmp.put_u8(self.rssi);
26582        if matches!(version, MavlinkVersion::V2) {
26583            let len = __tmp.len();
26584            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26585        } else {
26586            __tmp.len()
26587        }
26588    }
26589}
26590#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
26591#[doc = ""]
26592#[doc = "ID: 70"]
26593#[derive(Debug, Clone, PartialEq)]
26594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26596#[cfg_attr(feature = "ts", derive(TS))]
26597#[cfg_attr(feature = "ts", ts(export))]
26598pub struct RC_CHANNELS_OVERRIDE_DATA {
26599    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26600    pub chan1_raw: u16,
26601    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26602    pub chan2_raw: u16,
26603    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26604    pub chan3_raw: u16,
26605    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26606    pub chan4_raw: u16,
26607    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26608    pub chan5_raw: u16,
26609    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26610    pub chan6_raw: u16,
26611    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26612    pub chan7_raw: u16,
26613    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26614    pub chan8_raw: u16,
26615    #[doc = "System ID"]
26616    pub target_system: u8,
26617    #[doc = "Component ID"]
26618    pub target_component: u8,
26619    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26620    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26621    pub chan9_raw: u16,
26622    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26623    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26624    pub chan10_raw: u16,
26625    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26626    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26627    pub chan11_raw: u16,
26628    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26629    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26630    pub chan12_raw: u16,
26631    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26632    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26633    pub chan13_raw: u16,
26634    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26635    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26636    pub chan14_raw: u16,
26637    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26638    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26639    pub chan15_raw: u16,
26640    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26641    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26642    pub chan16_raw: u16,
26643    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26644    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26645    pub chan17_raw: u16,
26646    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26647    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26648    pub chan18_raw: u16,
26649}
26650impl RC_CHANNELS_OVERRIDE_DATA {
26651    pub const ENCODED_LEN: usize = 38usize;
26652    pub const DEFAULT: Self = Self {
26653        chan1_raw: 0_u16,
26654        chan2_raw: 0_u16,
26655        chan3_raw: 0_u16,
26656        chan4_raw: 0_u16,
26657        chan5_raw: 0_u16,
26658        chan6_raw: 0_u16,
26659        chan7_raw: 0_u16,
26660        chan8_raw: 0_u16,
26661        target_system: 0_u8,
26662        target_component: 0_u8,
26663        chan9_raw: 0_u16,
26664        chan10_raw: 0_u16,
26665        chan11_raw: 0_u16,
26666        chan12_raw: 0_u16,
26667        chan13_raw: 0_u16,
26668        chan14_raw: 0_u16,
26669        chan15_raw: 0_u16,
26670        chan16_raw: 0_u16,
26671        chan17_raw: 0_u16,
26672        chan18_raw: 0_u16,
26673    };
26674    #[cfg(feature = "arbitrary")]
26675    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26676        use arbitrary::{Arbitrary, Unstructured};
26677        let mut buf = [0u8; 1024];
26678        rng.fill_bytes(&mut buf);
26679        let mut unstructured = Unstructured::new(&buf);
26680        Self::arbitrary(&mut unstructured).unwrap_or_default()
26681    }
26682}
26683impl Default for RC_CHANNELS_OVERRIDE_DATA {
26684    fn default() -> Self {
26685        Self::DEFAULT.clone()
26686    }
26687}
26688impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
26689    type Message = MavMessage;
26690    const ID: u32 = 70u32;
26691    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
26692    const EXTRA_CRC: u8 = 124u8;
26693    const ENCODED_LEN: usize = 38usize;
26694    fn deser(
26695        _version: MavlinkVersion,
26696        __input: &[u8],
26697    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26698        let avail_len = __input.len();
26699        let mut payload_buf = [0; Self::ENCODED_LEN];
26700        let mut buf = if avail_len < Self::ENCODED_LEN {
26701            payload_buf[0..avail_len].copy_from_slice(__input);
26702            Bytes::new(&payload_buf)
26703        } else {
26704            Bytes::new(__input)
26705        };
26706        let mut __struct = Self::default();
26707        __struct.chan1_raw = buf.get_u16_le()?;
26708        __struct.chan2_raw = buf.get_u16_le()?;
26709        __struct.chan3_raw = buf.get_u16_le()?;
26710        __struct.chan4_raw = buf.get_u16_le()?;
26711        __struct.chan5_raw = buf.get_u16_le()?;
26712        __struct.chan6_raw = buf.get_u16_le()?;
26713        __struct.chan7_raw = buf.get_u16_le()?;
26714        __struct.chan8_raw = buf.get_u16_le()?;
26715        __struct.target_system = buf.get_u8()?;
26716        __struct.target_component = buf.get_u8()?;
26717        __struct.chan9_raw = buf.get_u16_le()?;
26718        __struct.chan10_raw = buf.get_u16_le()?;
26719        __struct.chan11_raw = buf.get_u16_le()?;
26720        __struct.chan12_raw = buf.get_u16_le()?;
26721        __struct.chan13_raw = buf.get_u16_le()?;
26722        __struct.chan14_raw = buf.get_u16_le()?;
26723        __struct.chan15_raw = buf.get_u16_le()?;
26724        __struct.chan16_raw = buf.get_u16_le()?;
26725        __struct.chan17_raw = buf.get_u16_le()?;
26726        __struct.chan18_raw = buf.get_u16_le()?;
26727        Ok(__struct)
26728    }
26729    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26730        let mut __tmp = BytesMut::new(bytes);
26731        #[allow(clippy::absurd_extreme_comparisons)]
26732        #[allow(unused_comparisons)]
26733        if __tmp.remaining() < Self::ENCODED_LEN {
26734            panic!(
26735                "buffer is too small (need {} bytes, but got {})",
26736                Self::ENCODED_LEN,
26737                __tmp.remaining(),
26738            )
26739        }
26740        __tmp.put_u16_le(self.chan1_raw);
26741        __tmp.put_u16_le(self.chan2_raw);
26742        __tmp.put_u16_le(self.chan3_raw);
26743        __tmp.put_u16_le(self.chan4_raw);
26744        __tmp.put_u16_le(self.chan5_raw);
26745        __tmp.put_u16_le(self.chan6_raw);
26746        __tmp.put_u16_le(self.chan7_raw);
26747        __tmp.put_u16_le(self.chan8_raw);
26748        __tmp.put_u8(self.target_system);
26749        __tmp.put_u8(self.target_component);
26750        if matches!(version, MavlinkVersion::V2) {
26751            __tmp.put_u16_le(self.chan9_raw);
26752            __tmp.put_u16_le(self.chan10_raw);
26753            __tmp.put_u16_le(self.chan11_raw);
26754            __tmp.put_u16_le(self.chan12_raw);
26755            __tmp.put_u16_le(self.chan13_raw);
26756            __tmp.put_u16_le(self.chan14_raw);
26757            __tmp.put_u16_le(self.chan15_raw);
26758            __tmp.put_u16_le(self.chan16_raw);
26759            __tmp.put_u16_le(self.chan17_raw);
26760            __tmp.put_u16_le(self.chan18_raw);
26761            let len = __tmp.len();
26762            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26763        } else {
26764            __tmp.len()
26765        }
26766    }
26767}
26768#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26769#[doc = ""]
26770#[doc = "ID: 35"]
26771#[derive(Debug, Clone, PartialEq)]
26772#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26773#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26774#[cfg_attr(feature = "ts", derive(TS))]
26775#[cfg_attr(feature = "ts", ts(export))]
26776pub struct RC_CHANNELS_RAW_DATA {
26777    #[doc = "Timestamp (time since system boot)."]
26778    pub time_boot_ms: u32,
26779    #[doc = "RC channel 1 value."]
26780    pub chan1_raw: u16,
26781    #[doc = "RC channel 2 value."]
26782    pub chan2_raw: u16,
26783    #[doc = "RC channel 3 value."]
26784    pub chan3_raw: u16,
26785    #[doc = "RC channel 4 value."]
26786    pub chan4_raw: u16,
26787    #[doc = "RC channel 5 value."]
26788    pub chan5_raw: u16,
26789    #[doc = "RC channel 6 value."]
26790    pub chan6_raw: u16,
26791    #[doc = "RC channel 7 value."]
26792    pub chan7_raw: u16,
26793    #[doc = "RC channel 8 value."]
26794    pub chan8_raw: u16,
26795    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26796    pub port: u8,
26797    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26798    pub rssi: u8,
26799}
26800impl RC_CHANNELS_RAW_DATA {
26801    pub const ENCODED_LEN: usize = 22usize;
26802    pub const DEFAULT: Self = Self {
26803        time_boot_ms: 0_u32,
26804        chan1_raw: 0_u16,
26805        chan2_raw: 0_u16,
26806        chan3_raw: 0_u16,
26807        chan4_raw: 0_u16,
26808        chan5_raw: 0_u16,
26809        chan6_raw: 0_u16,
26810        chan7_raw: 0_u16,
26811        chan8_raw: 0_u16,
26812        port: 0_u8,
26813        rssi: 0_u8,
26814    };
26815    #[cfg(feature = "arbitrary")]
26816    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26817        use arbitrary::{Arbitrary, Unstructured};
26818        let mut buf = [0u8; 1024];
26819        rng.fill_bytes(&mut buf);
26820        let mut unstructured = Unstructured::new(&buf);
26821        Self::arbitrary(&mut unstructured).unwrap_or_default()
26822    }
26823}
26824impl Default for RC_CHANNELS_RAW_DATA {
26825    fn default() -> Self {
26826        Self::DEFAULT.clone()
26827    }
26828}
26829impl MessageData for RC_CHANNELS_RAW_DATA {
26830    type Message = MavMessage;
26831    const ID: u32 = 35u32;
26832    const NAME: &'static str = "RC_CHANNELS_RAW";
26833    const EXTRA_CRC: u8 = 244u8;
26834    const ENCODED_LEN: usize = 22usize;
26835    fn deser(
26836        _version: MavlinkVersion,
26837        __input: &[u8],
26838    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26839        let avail_len = __input.len();
26840        let mut payload_buf = [0; Self::ENCODED_LEN];
26841        let mut buf = if avail_len < Self::ENCODED_LEN {
26842            payload_buf[0..avail_len].copy_from_slice(__input);
26843            Bytes::new(&payload_buf)
26844        } else {
26845            Bytes::new(__input)
26846        };
26847        let mut __struct = Self::default();
26848        __struct.time_boot_ms = buf.get_u32_le()?;
26849        __struct.chan1_raw = buf.get_u16_le()?;
26850        __struct.chan2_raw = buf.get_u16_le()?;
26851        __struct.chan3_raw = buf.get_u16_le()?;
26852        __struct.chan4_raw = buf.get_u16_le()?;
26853        __struct.chan5_raw = buf.get_u16_le()?;
26854        __struct.chan6_raw = buf.get_u16_le()?;
26855        __struct.chan7_raw = buf.get_u16_le()?;
26856        __struct.chan8_raw = buf.get_u16_le()?;
26857        __struct.port = buf.get_u8()?;
26858        __struct.rssi = buf.get_u8()?;
26859        Ok(__struct)
26860    }
26861    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26862        let mut __tmp = BytesMut::new(bytes);
26863        #[allow(clippy::absurd_extreme_comparisons)]
26864        #[allow(unused_comparisons)]
26865        if __tmp.remaining() < Self::ENCODED_LEN {
26866            panic!(
26867                "buffer is too small (need {} bytes, but got {})",
26868                Self::ENCODED_LEN,
26869                __tmp.remaining(),
26870            )
26871        }
26872        __tmp.put_u32_le(self.time_boot_ms);
26873        __tmp.put_u16_le(self.chan1_raw);
26874        __tmp.put_u16_le(self.chan2_raw);
26875        __tmp.put_u16_le(self.chan3_raw);
26876        __tmp.put_u16_le(self.chan4_raw);
26877        __tmp.put_u16_le(self.chan5_raw);
26878        __tmp.put_u16_le(self.chan6_raw);
26879        __tmp.put_u16_le(self.chan7_raw);
26880        __tmp.put_u16_le(self.chan8_raw);
26881        __tmp.put_u8(self.port);
26882        __tmp.put_u8(self.rssi);
26883        if matches!(version, MavlinkVersion::V2) {
26884            let len = __tmp.len();
26885            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26886        } else {
26887            __tmp.len()
26888        }
26889    }
26890}
26891#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26892#[doc = ""]
26893#[doc = "ID: 34"]
26894#[derive(Debug, Clone, PartialEq)]
26895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26896#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26897#[cfg_attr(feature = "ts", derive(TS))]
26898#[cfg_attr(feature = "ts", ts(export))]
26899pub struct RC_CHANNELS_SCALED_DATA {
26900    #[doc = "Timestamp (time since system boot)."]
26901    pub time_boot_ms: u32,
26902    #[doc = "RC channel 1 value scaled."]
26903    pub chan1_scaled: i16,
26904    #[doc = "RC channel 2 value scaled."]
26905    pub chan2_scaled: i16,
26906    #[doc = "RC channel 3 value scaled."]
26907    pub chan3_scaled: i16,
26908    #[doc = "RC channel 4 value scaled."]
26909    pub chan4_scaled: i16,
26910    #[doc = "RC channel 5 value scaled."]
26911    pub chan5_scaled: i16,
26912    #[doc = "RC channel 6 value scaled."]
26913    pub chan6_scaled: i16,
26914    #[doc = "RC channel 7 value scaled."]
26915    pub chan7_scaled: i16,
26916    #[doc = "RC channel 8 value scaled."]
26917    pub chan8_scaled: i16,
26918    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26919    pub port: u8,
26920    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26921    pub rssi: u8,
26922}
26923impl RC_CHANNELS_SCALED_DATA {
26924    pub const ENCODED_LEN: usize = 22usize;
26925    pub const DEFAULT: Self = Self {
26926        time_boot_ms: 0_u32,
26927        chan1_scaled: 0_i16,
26928        chan2_scaled: 0_i16,
26929        chan3_scaled: 0_i16,
26930        chan4_scaled: 0_i16,
26931        chan5_scaled: 0_i16,
26932        chan6_scaled: 0_i16,
26933        chan7_scaled: 0_i16,
26934        chan8_scaled: 0_i16,
26935        port: 0_u8,
26936        rssi: 0_u8,
26937    };
26938    #[cfg(feature = "arbitrary")]
26939    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26940        use arbitrary::{Arbitrary, Unstructured};
26941        let mut buf = [0u8; 1024];
26942        rng.fill_bytes(&mut buf);
26943        let mut unstructured = Unstructured::new(&buf);
26944        Self::arbitrary(&mut unstructured).unwrap_or_default()
26945    }
26946}
26947impl Default for RC_CHANNELS_SCALED_DATA {
26948    fn default() -> Self {
26949        Self::DEFAULT.clone()
26950    }
26951}
26952impl MessageData for RC_CHANNELS_SCALED_DATA {
26953    type Message = MavMessage;
26954    const ID: u32 = 34u32;
26955    const NAME: &'static str = "RC_CHANNELS_SCALED";
26956    const EXTRA_CRC: u8 = 237u8;
26957    const ENCODED_LEN: usize = 22usize;
26958    fn deser(
26959        _version: MavlinkVersion,
26960        __input: &[u8],
26961    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26962        let avail_len = __input.len();
26963        let mut payload_buf = [0; Self::ENCODED_LEN];
26964        let mut buf = if avail_len < Self::ENCODED_LEN {
26965            payload_buf[0..avail_len].copy_from_slice(__input);
26966            Bytes::new(&payload_buf)
26967        } else {
26968            Bytes::new(__input)
26969        };
26970        let mut __struct = Self::default();
26971        __struct.time_boot_ms = buf.get_u32_le()?;
26972        __struct.chan1_scaled = buf.get_i16_le()?;
26973        __struct.chan2_scaled = buf.get_i16_le()?;
26974        __struct.chan3_scaled = buf.get_i16_le()?;
26975        __struct.chan4_scaled = buf.get_i16_le()?;
26976        __struct.chan5_scaled = buf.get_i16_le()?;
26977        __struct.chan6_scaled = buf.get_i16_le()?;
26978        __struct.chan7_scaled = buf.get_i16_le()?;
26979        __struct.chan8_scaled = buf.get_i16_le()?;
26980        __struct.port = buf.get_u8()?;
26981        __struct.rssi = buf.get_u8()?;
26982        Ok(__struct)
26983    }
26984    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26985        let mut __tmp = BytesMut::new(bytes);
26986        #[allow(clippy::absurd_extreme_comparisons)]
26987        #[allow(unused_comparisons)]
26988        if __tmp.remaining() < Self::ENCODED_LEN {
26989            panic!(
26990                "buffer is too small (need {} bytes, but got {})",
26991                Self::ENCODED_LEN,
26992                __tmp.remaining(),
26993            )
26994        }
26995        __tmp.put_u32_le(self.time_boot_ms);
26996        __tmp.put_i16_le(self.chan1_scaled);
26997        __tmp.put_i16_le(self.chan2_scaled);
26998        __tmp.put_i16_le(self.chan3_scaled);
26999        __tmp.put_i16_le(self.chan4_scaled);
27000        __tmp.put_i16_le(self.chan5_scaled);
27001        __tmp.put_i16_le(self.chan6_scaled);
27002        __tmp.put_i16_le(self.chan7_scaled);
27003        __tmp.put_i16_le(self.chan8_scaled);
27004        __tmp.put_u8(self.port);
27005        __tmp.put_u8(self.rssi);
27006        if matches!(version, MavlinkVersion::V2) {
27007            let len = __tmp.len();
27008            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27009        } else {
27010            __tmp.len()
27011        }
27012    }
27013}
27014#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
27015#[doc = "Request a data stream."]
27016#[doc = ""]
27017#[doc = "ID: 66"]
27018#[derive(Debug, Clone, PartialEq)]
27019#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27020#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27021#[cfg_attr(feature = "ts", derive(TS))]
27022#[cfg_attr(feature = "ts", ts(export))]
27023pub struct REQUEST_DATA_STREAM_DATA {
27024    #[doc = "The requested message rate"]
27025    pub req_message_rate: u16,
27026    #[doc = "The target requested to send the message stream."]
27027    pub target_system: u8,
27028    #[doc = "The target requested to send the message stream."]
27029    pub target_component: u8,
27030    #[doc = "The ID of the requested data stream"]
27031    pub req_stream_id: u8,
27032    #[doc = "1 to start sending, 0 to stop sending."]
27033    pub start_stop: u8,
27034}
27035impl REQUEST_DATA_STREAM_DATA {
27036    pub const ENCODED_LEN: usize = 6usize;
27037    pub const DEFAULT: Self = Self {
27038        req_message_rate: 0_u16,
27039        target_system: 0_u8,
27040        target_component: 0_u8,
27041        req_stream_id: 0_u8,
27042        start_stop: 0_u8,
27043    };
27044    #[cfg(feature = "arbitrary")]
27045    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27046        use arbitrary::{Arbitrary, Unstructured};
27047        let mut buf = [0u8; 1024];
27048        rng.fill_bytes(&mut buf);
27049        let mut unstructured = Unstructured::new(&buf);
27050        Self::arbitrary(&mut unstructured).unwrap_or_default()
27051    }
27052}
27053impl Default for REQUEST_DATA_STREAM_DATA {
27054    fn default() -> Self {
27055        Self::DEFAULT.clone()
27056    }
27057}
27058impl MessageData for REQUEST_DATA_STREAM_DATA {
27059    type Message = MavMessage;
27060    const ID: u32 = 66u32;
27061    const NAME: &'static str = "REQUEST_DATA_STREAM";
27062    const EXTRA_CRC: u8 = 148u8;
27063    const ENCODED_LEN: usize = 6usize;
27064    fn deser(
27065        _version: MavlinkVersion,
27066        __input: &[u8],
27067    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27068        let avail_len = __input.len();
27069        let mut payload_buf = [0; Self::ENCODED_LEN];
27070        let mut buf = if avail_len < Self::ENCODED_LEN {
27071            payload_buf[0..avail_len].copy_from_slice(__input);
27072            Bytes::new(&payload_buf)
27073        } else {
27074            Bytes::new(__input)
27075        };
27076        let mut __struct = Self::default();
27077        __struct.req_message_rate = buf.get_u16_le()?;
27078        __struct.target_system = buf.get_u8()?;
27079        __struct.target_component = buf.get_u8()?;
27080        __struct.req_stream_id = buf.get_u8()?;
27081        __struct.start_stop = buf.get_u8()?;
27082        Ok(__struct)
27083    }
27084    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27085        let mut __tmp = BytesMut::new(bytes);
27086        #[allow(clippy::absurd_extreme_comparisons)]
27087        #[allow(unused_comparisons)]
27088        if __tmp.remaining() < Self::ENCODED_LEN {
27089            panic!(
27090                "buffer is too small (need {} bytes, but got {})",
27091                Self::ENCODED_LEN,
27092                __tmp.remaining(),
27093            )
27094        }
27095        __tmp.put_u16_le(self.req_message_rate);
27096        __tmp.put_u8(self.target_system);
27097        __tmp.put_u8(self.target_component);
27098        __tmp.put_u8(self.req_stream_id);
27099        __tmp.put_u8(self.start_stop);
27100        if matches!(version, MavlinkVersion::V2) {
27101            let len = __tmp.len();
27102            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27103        } else {
27104            __tmp.len()
27105        }
27106    }
27107}
27108#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
27109#[doc = ""]
27110#[doc = "ID: 412"]
27111#[derive(Debug, Clone, PartialEq)]
27112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27113#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27114#[cfg_attr(feature = "ts", derive(TS))]
27115#[cfg_attr(feature = "ts", ts(export))]
27116pub struct REQUEST_EVENT_DATA {
27117    #[doc = "First sequence number of the requested event."]
27118    pub first_sequence: u16,
27119    #[doc = "Last sequence number of the requested event."]
27120    pub last_sequence: u16,
27121    #[doc = "System ID"]
27122    pub target_system: u8,
27123    #[doc = "Component ID"]
27124    pub target_component: u8,
27125}
27126impl REQUEST_EVENT_DATA {
27127    pub const ENCODED_LEN: usize = 6usize;
27128    pub const DEFAULT: Self = Self {
27129        first_sequence: 0_u16,
27130        last_sequence: 0_u16,
27131        target_system: 0_u8,
27132        target_component: 0_u8,
27133    };
27134    #[cfg(feature = "arbitrary")]
27135    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27136        use arbitrary::{Arbitrary, Unstructured};
27137        let mut buf = [0u8; 1024];
27138        rng.fill_bytes(&mut buf);
27139        let mut unstructured = Unstructured::new(&buf);
27140        Self::arbitrary(&mut unstructured).unwrap_or_default()
27141    }
27142}
27143impl Default for REQUEST_EVENT_DATA {
27144    fn default() -> Self {
27145        Self::DEFAULT.clone()
27146    }
27147}
27148impl MessageData for REQUEST_EVENT_DATA {
27149    type Message = MavMessage;
27150    const ID: u32 = 412u32;
27151    const NAME: &'static str = "REQUEST_EVENT";
27152    const EXTRA_CRC: u8 = 33u8;
27153    const ENCODED_LEN: usize = 6usize;
27154    fn deser(
27155        _version: MavlinkVersion,
27156        __input: &[u8],
27157    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27158        let avail_len = __input.len();
27159        let mut payload_buf = [0; Self::ENCODED_LEN];
27160        let mut buf = if avail_len < Self::ENCODED_LEN {
27161            payload_buf[0..avail_len].copy_from_slice(__input);
27162            Bytes::new(&payload_buf)
27163        } else {
27164            Bytes::new(__input)
27165        };
27166        let mut __struct = Self::default();
27167        __struct.first_sequence = buf.get_u16_le()?;
27168        __struct.last_sequence = buf.get_u16_le()?;
27169        __struct.target_system = buf.get_u8()?;
27170        __struct.target_component = buf.get_u8()?;
27171        Ok(__struct)
27172    }
27173    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27174        let mut __tmp = BytesMut::new(bytes);
27175        #[allow(clippy::absurd_extreme_comparisons)]
27176        #[allow(unused_comparisons)]
27177        if __tmp.remaining() < Self::ENCODED_LEN {
27178            panic!(
27179                "buffer is too small (need {} bytes, but got {})",
27180                Self::ENCODED_LEN,
27181                __tmp.remaining(),
27182            )
27183        }
27184        __tmp.put_u16_le(self.first_sequence);
27185        __tmp.put_u16_le(self.last_sequence);
27186        __tmp.put_u8(self.target_system);
27187        __tmp.put_u8(self.target_component);
27188        if matches!(version, MavlinkVersion::V2) {
27189            let len = __tmp.len();
27190            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27191        } else {
27192            __tmp.len()
27193        }
27194    }
27195}
27196#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
27197#[doc = ""]
27198#[doc = "ID: 142"]
27199#[derive(Debug, Clone, PartialEq)]
27200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27201#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27202#[cfg_attr(feature = "ts", derive(TS))]
27203#[cfg_attr(feature = "ts", ts(export))]
27204pub struct RESOURCE_REQUEST_DATA {
27205    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
27206    pub request_id: u8,
27207    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
27208    pub uri_type: u8,
27209    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
27210    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27211    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27212    pub uri: [u8; 120],
27213    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
27214    pub transfer_type: u8,
27215    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
27216    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27217    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27218    pub storage: [u8; 120],
27219}
27220impl RESOURCE_REQUEST_DATA {
27221    pub const ENCODED_LEN: usize = 243usize;
27222    pub const DEFAULT: Self = Self {
27223        request_id: 0_u8,
27224        uri_type: 0_u8,
27225        uri: [0_u8; 120usize],
27226        transfer_type: 0_u8,
27227        storage: [0_u8; 120usize],
27228    };
27229    #[cfg(feature = "arbitrary")]
27230    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27231        use arbitrary::{Arbitrary, Unstructured};
27232        let mut buf = [0u8; 1024];
27233        rng.fill_bytes(&mut buf);
27234        let mut unstructured = Unstructured::new(&buf);
27235        Self::arbitrary(&mut unstructured).unwrap_or_default()
27236    }
27237}
27238impl Default for RESOURCE_REQUEST_DATA {
27239    fn default() -> Self {
27240        Self::DEFAULT.clone()
27241    }
27242}
27243impl MessageData for RESOURCE_REQUEST_DATA {
27244    type Message = MavMessage;
27245    const ID: u32 = 142u32;
27246    const NAME: &'static str = "RESOURCE_REQUEST";
27247    const EXTRA_CRC: u8 = 72u8;
27248    const ENCODED_LEN: usize = 243usize;
27249    fn deser(
27250        _version: MavlinkVersion,
27251        __input: &[u8],
27252    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27253        let avail_len = __input.len();
27254        let mut payload_buf = [0; Self::ENCODED_LEN];
27255        let mut buf = if avail_len < Self::ENCODED_LEN {
27256            payload_buf[0..avail_len].copy_from_slice(__input);
27257            Bytes::new(&payload_buf)
27258        } else {
27259            Bytes::new(__input)
27260        };
27261        let mut __struct = Self::default();
27262        __struct.request_id = buf.get_u8()?;
27263        __struct.uri_type = buf.get_u8()?;
27264        for v in &mut __struct.uri {
27265            let val = buf.get_u8()?;
27266            *v = val;
27267        }
27268        __struct.transfer_type = buf.get_u8()?;
27269        for v in &mut __struct.storage {
27270            let val = buf.get_u8()?;
27271            *v = val;
27272        }
27273        Ok(__struct)
27274    }
27275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27276        let mut __tmp = BytesMut::new(bytes);
27277        #[allow(clippy::absurd_extreme_comparisons)]
27278        #[allow(unused_comparisons)]
27279        if __tmp.remaining() < Self::ENCODED_LEN {
27280            panic!(
27281                "buffer is too small (need {} bytes, but got {})",
27282                Self::ENCODED_LEN,
27283                __tmp.remaining(),
27284            )
27285        }
27286        __tmp.put_u8(self.request_id);
27287        __tmp.put_u8(self.uri_type);
27288        for val in &self.uri {
27289            __tmp.put_u8(*val);
27290        }
27291        __tmp.put_u8(self.transfer_type);
27292        for val in &self.storage {
27293            __tmp.put_u8(*val);
27294        }
27295        if matches!(version, MavlinkVersion::V2) {
27296            let len = __tmp.len();
27297            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27298        } else {
27299            __tmp.len()
27300        }
27301    }
27302}
27303#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
27304#[doc = ""]
27305#[doc = "ID: 413"]
27306#[derive(Debug, Clone, PartialEq)]
27307#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27308#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27309#[cfg_attr(feature = "ts", derive(TS))]
27310#[cfg_attr(feature = "ts", ts(export))]
27311pub struct RESPONSE_EVENT_ERROR_DATA {
27312    #[doc = "Sequence number."]
27313    pub sequence: u16,
27314    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
27315    pub sequence_oldest_available: u16,
27316    #[doc = "System ID"]
27317    pub target_system: u8,
27318    #[doc = "Component ID"]
27319    pub target_component: u8,
27320    #[doc = "Error reason."]
27321    pub reason: MavEventErrorReason,
27322}
27323impl RESPONSE_EVENT_ERROR_DATA {
27324    pub const ENCODED_LEN: usize = 7usize;
27325    pub const DEFAULT: Self = Self {
27326        sequence: 0_u16,
27327        sequence_oldest_available: 0_u16,
27328        target_system: 0_u8,
27329        target_component: 0_u8,
27330        reason: MavEventErrorReason::DEFAULT,
27331    };
27332    #[cfg(feature = "arbitrary")]
27333    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27334        use arbitrary::{Arbitrary, Unstructured};
27335        let mut buf = [0u8; 1024];
27336        rng.fill_bytes(&mut buf);
27337        let mut unstructured = Unstructured::new(&buf);
27338        Self::arbitrary(&mut unstructured).unwrap_or_default()
27339    }
27340}
27341impl Default for RESPONSE_EVENT_ERROR_DATA {
27342    fn default() -> Self {
27343        Self::DEFAULT.clone()
27344    }
27345}
27346impl MessageData for RESPONSE_EVENT_ERROR_DATA {
27347    type Message = MavMessage;
27348    const ID: u32 = 413u32;
27349    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
27350    const EXTRA_CRC: u8 = 77u8;
27351    const ENCODED_LEN: usize = 7usize;
27352    fn deser(
27353        _version: MavlinkVersion,
27354        __input: &[u8],
27355    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27356        let avail_len = __input.len();
27357        let mut payload_buf = [0; Self::ENCODED_LEN];
27358        let mut buf = if avail_len < Self::ENCODED_LEN {
27359            payload_buf[0..avail_len].copy_from_slice(__input);
27360            Bytes::new(&payload_buf)
27361        } else {
27362            Bytes::new(__input)
27363        };
27364        let mut __struct = Self::default();
27365        __struct.sequence = buf.get_u16_le()?;
27366        __struct.sequence_oldest_available = buf.get_u16_le()?;
27367        __struct.target_system = buf.get_u8()?;
27368        __struct.target_component = buf.get_u8()?;
27369        let tmp = buf.get_u8()?;
27370        __struct.reason =
27371            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27372                enum_type: "MavEventErrorReason",
27373                value: tmp as u64,
27374            })?;
27375        Ok(__struct)
27376    }
27377    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27378        let mut __tmp = BytesMut::new(bytes);
27379        #[allow(clippy::absurd_extreme_comparisons)]
27380        #[allow(unused_comparisons)]
27381        if __tmp.remaining() < Self::ENCODED_LEN {
27382            panic!(
27383                "buffer is too small (need {} bytes, but got {})",
27384                Self::ENCODED_LEN,
27385                __tmp.remaining(),
27386            )
27387        }
27388        __tmp.put_u16_le(self.sequence);
27389        __tmp.put_u16_le(self.sequence_oldest_available);
27390        __tmp.put_u8(self.target_system);
27391        __tmp.put_u8(self.target_component);
27392        __tmp.put_u8(self.reason as u8);
27393        if matches!(version, MavlinkVersion::V2) {
27394            let len = __tmp.len();
27395            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27396        } else {
27397            __tmp.len()
27398        }
27399    }
27400}
27401#[doc = "Read out the safety zone the MAV currently assumes."]
27402#[doc = ""]
27403#[doc = "ID: 55"]
27404#[derive(Debug, Clone, PartialEq)]
27405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27407#[cfg_attr(feature = "ts", derive(TS))]
27408#[cfg_attr(feature = "ts", ts(export))]
27409pub struct SAFETY_ALLOWED_AREA_DATA {
27410    #[doc = "x position 1 / Latitude 1"]
27411    pub p1x: f32,
27412    #[doc = "y position 1 / Longitude 1"]
27413    pub p1y: f32,
27414    #[doc = "z position 1 / Altitude 1"]
27415    pub p1z: f32,
27416    #[doc = "x position 2 / Latitude 2"]
27417    pub p2x: f32,
27418    #[doc = "y position 2 / Longitude 2"]
27419    pub p2y: f32,
27420    #[doc = "z position 2 / Altitude 2"]
27421    pub p2z: f32,
27422    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27423    pub frame: MavFrame,
27424}
27425impl SAFETY_ALLOWED_AREA_DATA {
27426    pub const ENCODED_LEN: usize = 25usize;
27427    pub const DEFAULT: Self = Self {
27428        p1x: 0.0_f32,
27429        p1y: 0.0_f32,
27430        p1z: 0.0_f32,
27431        p2x: 0.0_f32,
27432        p2y: 0.0_f32,
27433        p2z: 0.0_f32,
27434        frame: MavFrame::DEFAULT,
27435    };
27436    #[cfg(feature = "arbitrary")]
27437    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27438        use arbitrary::{Arbitrary, Unstructured};
27439        let mut buf = [0u8; 1024];
27440        rng.fill_bytes(&mut buf);
27441        let mut unstructured = Unstructured::new(&buf);
27442        Self::arbitrary(&mut unstructured).unwrap_or_default()
27443    }
27444}
27445impl Default for SAFETY_ALLOWED_AREA_DATA {
27446    fn default() -> Self {
27447        Self::DEFAULT.clone()
27448    }
27449}
27450impl MessageData for SAFETY_ALLOWED_AREA_DATA {
27451    type Message = MavMessage;
27452    const ID: u32 = 55u32;
27453    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
27454    const EXTRA_CRC: u8 = 3u8;
27455    const ENCODED_LEN: usize = 25usize;
27456    fn deser(
27457        _version: MavlinkVersion,
27458        __input: &[u8],
27459    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27460        let avail_len = __input.len();
27461        let mut payload_buf = [0; Self::ENCODED_LEN];
27462        let mut buf = if avail_len < Self::ENCODED_LEN {
27463            payload_buf[0..avail_len].copy_from_slice(__input);
27464            Bytes::new(&payload_buf)
27465        } else {
27466            Bytes::new(__input)
27467        };
27468        let mut __struct = Self::default();
27469        __struct.p1x = buf.get_f32_le()?;
27470        __struct.p1y = buf.get_f32_le()?;
27471        __struct.p1z = buf.get_f32_le()?;
27472        __struct.p2x = buf.get_f32_le()?;
27473        __struct.p2y = buf.get_f32_le()?;
27474        __struct.p2z = buf.get_f32_le()?;
27475        let tmp = buf.get_u8()?;
27476        __struct.frame =
27477            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27478                enum_type: "MavFrame",
27479                value: tmp as u64,
27480            })?;
27481        Ok(__struct)
27482    }
27483    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27484        let mut __tmp = BytesMut::new(bytes);
27485        #[allow(clippy::absurd_extreme_comparisons)]
27486        #[allow(unused_comparisons)]
27487        if __tmp.remaining() < Self::ENCODED_LEN {
27488            panic!(
27489                "buffer is too small (need {} bytes, but got {})",
27490                Self::ENCODED_LEN,
27491                __tmp.remaining(),
27492            )
27493        }
27494        __tmp.put_f32_le(self.p1x);
27495        __tmp.put_f32_le(self.p1y);
27496        __tmp.put_f32_le(self.p1z);
27497        __tmp.put_f32_le(self.p2x);
27498        __tmp.put_f32_le(self.p2y);
27499        __tmp.put_f32_le(self.p2z);
27500        __tmp.put_u8(self.frame as u8);
27501        if matches!(version, MavlinkVersion::V2) {
27502            let len = __tmp.len();
27503            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27504        } else {
27505            __tmp.len()
27506        }
27507    }
27508}
27509#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
27510#[doc = ""]
27511#[doc = "ID: 54"]
27512#[derive(Debug, Clone, PartialEq)]
27513#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27515#[cfg_attr(feature = "ts", derive(TS))]
27516#[cfg_attr(feature = "ts", ts(export))]
27517pub struct SAFETY_SET_ALLOWED_AREA_DATA {
27518    #[doc = "x position 1 / Latitude 1"]
27519    pub p1x: f32,
27520    #[doc = "y position 1 / Longitude 1"]
27521    pub p1y: f32,
27522    #[doc = "z position 1 / Altitude 1"]
27523    pub p1z: f32,
27524    #[doc = "x position 2 / Latitude 2"]
27525    pub p2x: f32,
27526    #[doc = "y position 2 / Longitude 2"]
27527    pub p2y: f32,
27528    #[doc = "z position 2 / Altitude 2"]
27529    pub p2z: f32,
27530    #[doc = "System ID"]
27531    pub target_system: u8,
27532    #[doc = "Component ID"]
27533    pub target_component: u8,
27534    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27535    pub frame: MavFrame,
27536}
27537impl SAFETY_SET_ALLOWED_AREA_DATA {
27538    pub const ENCODED_LEN: usize = 27usize;
27539    pub const DEFAULT: Self = Self {
27540        p1x: 0.0_f32,
27541        p1y: 0.0_f32,
27542        p1z: 0.0_f32,
27543        p2x: 0.0_f32,
27544        p2y: 0.0_f32,
27545        p2z: 0.0_f32,
27546        target_system: 0_u8,
27547        target_component: 0_u8,
27548        frame: MavFrame::DEFAULT,
27549    };
27550    #[cfg(feature = "arbitrary")]
27551    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27552        use arbitrary::{Arbitrary, Unstructured};
27553        let mut buf = [0u8; 1024];
27554        rng.fill_bytes(&mut buf);
27555        let mut unstructured = Unstructured::new(&buf);
27556        Self::arbitrary(&mut unstructured).unwrap_or_default()
27557    }
27558}
27559impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
27560    fn default() -> Self {
27561        Self::DEFAULT.clone()
27562    }
27563}
27564impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
27565    type Message = MavMessage;
27566    const ID: u32 = 54u32;
27567    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
27568    const EXTRA_CRC: u8 = 15u8;
27569    const ENCODED_LEN: usize = 27usize;
27570    fn deser(
27571        _version: MavlinkVersion,
27572        __input: &[u8],
27573    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27574        let avail_len = __input.len();
27575        let mut payload_buf = [0; Self::ENCODED_LEN];
27576        let mut buf = if avail_len < Self::ENCODED_LEN {
27577            payload_buf[0..avail_len].copy_from_slice(__input);
27578            Bytes::new(&payload_buf)
27579        } else {
27580            Bytes::new(__input)
27581        };
27582        let mut __struct = Self::default();
27583        __struct.p1x = buf.get_f32_le()?;
27584        __struct.p1y = buf.get_f32_le()?;
27585        __struct.p1z = buf.get_f32_le()?;
27586        __struct.p2x = buf.get_f32_le()?;
27587        __struct.p2y = buf.get_f32_le()?;
27588        __struct.p2z = buf.get_f32_le()?;
27589        __struct.target_system = buf.get_u8()?;
27590        __struct.target_component = buf.get_u8()?;
27591        let tmp = buf.get_u8()?;
27592        __struct.frame =
27593            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27594                enum_type: "MavFrame",
27595                value: tmp as u64,
27596            })?;
27597        Ok(__struct)
27598    }
27599    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27600        let mut __tmp = BytesMut::new(bytes);
27601        #[allow(clippy::absurd_extreme_comparisons)]
27602        #[allow(unused_comparisons)]
27603        if __tmp.remaining() < Self::ENCODED_LEN {
27604            panic!(
27605                "buffer is too small (need {} bytes, but got {})",
27606                Self::ENCODED_LEN,
27607                __tmp.remaining(),
27608            )
27609        }
27610        __tmp.put_f32_le(self.p1x);
27611        __tmp.put_f32_le(self.p1y);
27612        __tmp.put_f32_le(self.p1z);
27613        __tmp.put_f32_le(self.p2x);
27614        __tmp.put_f32_le(self.p2y);
27615        __tmp.put_f32_le(self.p2z);
27616        __tmp.put_u8(self.target_system);
27617        __tmp.put_u8(self.target_component);
27618        __tmp.put_u8(self.frame as u8);
27619        if matches!(version, MavlinkVersion::V2) {
27620            let len = __tmp.len();
27621            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27622        } else {
27623            __tmp.len()
27624        }
27625    }
27626}
27627#[doc = "Status of the SatCom link."]
27628#[doc = ""]
27629#[doc = "ID: 8015"]
27630#[derive(Debug, Clone, PartialEq)]
27631#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27632#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27633#[cfg_attr(feature = "ts", derive(TS))]
27634#[cfg_attr(feature = "ts", ts(export))]
27635pub struct SATCOM_LINK_STATUS_DATA {
27636    #[doc = "Timestamp"]
27637    pub timestamp: u64,
27638    #[doc = "Timestamp of the last successful sbd session"]
27639    pub last_heartbeat: u64,
27640    #[doc = "Number of failed sessions"]
27641    pub failed_sessions: u16,
27642    #[doc = "Number of successful sessions"]
27643    pub successful_sessions: u16,
27644    #[doc = "Signal quality"]
27645    pub signal_quality: u8,
27646    #[doc = "Ring call pending"]
27647    pub ring_pending: u8,
27648    #[doc = "Transmission session pending"]
27649    pub tx_session_pending: u8,
27650    #[doc = "Receiving session pending"]
27651    pub rx_session_pending: u8,
27652}
27653impl SATCOM_LINK_STATUS_DATA {
27654    pub const ENCODED_LEN: usize = 24usize;
27655    pub const DEFAULT: Self = Self {
27656        timestamp: 0_u64,
27657        last_heartbeat: 0_u64,
27658        failed_sessions: 0_u16,
27659        successful_sessions: 0_u16,
27660        signal_quality: 0_u8,
27661        ring_pending: 0_u8,
27662        tx_session_pending: 0_u8,
27663        rx_session_pending: 0_u8,
27664    };
27665    #[cfg(feature = "arbitrary")]
27666    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27667        use arbitrary::{Arbitrary, Unstructured};
27668        let mut buf = [0u8; 1024];
27669        rng.fill_bytes(&mut buf);
27670        let mut unstructured = Unstructured::new(&buf);
27671        Self::arbitrary(&mut unstructured).unwrap_or_default()
27672    }
27673}
27674impl Default for SATCOM_LINK_STATUS_DATA {
27675    fn default() -> Self {
27676        Self::DEFAULT.clone()
27677    }
27678}
27679impl MessageData for SATCOM_LINK_STATUS_DATA {
27680    type Message = MavMessage;
27681    const ID: u32 = 8015u32;
27682    const NAME: &'static str = "SATCOM_LINK_STATUS";
27683    const EXTRA_CRC: u8 = 23u8;
27684    const ENCODED_LEN: usize = 24usize;
27685    fn deser(
27686        _version: MavlinkVersion,
27687        __input: &[u8],
27688    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27689        let avail_len = __input.len();
27690        let mut payload_buf = [0; Self::ENCODED_LEN];
27691        let mut buf = if avail_len < Self::ENCODED_LEN {
27692            payload_buf[0..avail_len].copy_from_slice(__input);
27693            Bytes::new(&payload_buf)
27694        } else {
27695            Bytes::new(__input)
27696        };
27697        let mut __struct = Self::default();
27698        __struct.timestamp = buf.get_u64_le()?;
27699        __struct.last_heartbeat = buf.get_u64_le()?;
27700        __struct.failed_sessions = buf.get_u16_le()?;
27701        __struct.successful_sessions = buf.get_u16_le()?;
27702        __struct.signal_quality = buf.get_u8()?;
27703        __struct.ring_pending = buf.get_u8()?;
27704        __struct.tx_session_pending = buf.get_u8()?;
27705        __struct.rx_session_pending = buf.get_u8()?;
27706        Ok(__struct)
27707    }
27708    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27709        let mut __tmp = BytesMut::new(bytes);
27710        #[allow(clippy::absurd_extreme_comparisons)]
27711        #[allow(unused_comparisons)]
27712        if __tmp.remaining() < Self::ENCODED_LEN {
27713            panic!(
27714                "buffer is too small (need {} bytes, but got {})",
27715                Self::ENCODED_LEN,
27716                __tmp.remaining(),
27717            )
27718        }
27719        __tmp.put_u64_le(self.timestamp);
27720        __tmp.put_u64_le(self.last_heartbeat);
27721        __tmp.put_u16_le(self.failed_sessions);
27722        __tmp.put_u16_le(self.successful_sessions);
27723        __tmp.put_u8(self.signal_quality);
27724        __tmp.put_u8(self.ring_pending);
27725        __tmp.put_u8(self.tx_session_pending);
27726        __tmp.put_u8(self.rx_session_pending);
27727        if matches!(version, MavlinkVersion::V2) {
27728            let len = __tmp.len();
27729            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27730        } else {
27731            __tmp.len()
27732        }
27733    }
27734}
27735#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
27736#[doc = ""]
27737#[doc = "ID: 26"]
27738#[derive(Debug, Clone, PartialEq)]
27739#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27740#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27741#[cfg_attr(feature = "ts", derive(TS))]
27742#[cfg_attr(feature = "ts", ts(export))]
27743pub struct SCALED_IMU_DATA {
27744    #[doc = "Timestamp (time since system boot)."]
27745    pub time_boot_ms: u32,
27746    #[doc = "X acceleration"]
27747    pub xacc: i16,
27748    #[doc = "Y acceleration"]
27749    pub yacc: i16,
27750    #[doc = "Z acceleration"]
27751    pub zacc: i16,
27752    #[doc = "Angular speed around X axis"]
27753    pub xgyro: i16,
27754    #[doc = "Angular speed around Y axis"]
27755    pub ygyro: i16,
27756    #[doc = "Angular speed around Z axis"]
27757    pub zgyro: i16,
27758    #[doc = "X Magnetic field"]
27759    pub xmag: i16,
27760    #[doc = "Y Magnetic field"]
27761    pub ymag: i16,
27762    #[doc = "Z Magnetic field"]
27763    pub zmag: i16,
27764    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27765    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27766    pub temperature: i16,
27767}
27768impl SCALED_IMU_DATA {
27769    pub const ENCODED_LEN: usize = 24usize;
27770    pub const DEFAULT: Self = Self {
27771        time_boot_ms: 0_u32,
27772        xacc: 0_i16,
27773        yacc: 0_i16,
27774        zacc: 0_i16,
27775        xgyro: 0_i16,
27776        ygyro: 0_i16,
27777        zgyro: 0_i16,
27778        xmag: 0_i16,
27779        ymag: 0_i16,
27780        zmag: 0_i16,
27781        temperature: 0_i16,
27782    };
27783    #[cfg(feature = "arbitrary")]
27784    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27785        use arbitrary::{Arbitrary, Unstructured};
27786        let mut buf = [0u8; 1024];
27787        rng.fill_bytes(&mut buf);
27788        let mut unstructured = Unstructured::new(&buf);
27789        Self::arbitrary(&mut unstructured).unwrap_or_default()
27790    }
27791}
27792impl Default for SCALED_IMU_DATA {
27793    fn default() -> Self {
27794        Self::DEFAULT.clone()
27795    }
27796}
27797impl MessageData for SCALED_IMU_DATA {
27798    type Message = MavMessage;
27799    const ID: u32 = 26u32;
27800    const NAME: &'static str = "SCALED_IMU";
27801    const EXTRA_CRC: u8 = 170u8;
27802    const ENCODED_LEN: usize = 24usize;
27803    fn deser(
27804        _version: MavlinkVersion,
27805        __input: &[u8],
27806    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27807        let avail_len = __input.len();
27808        let mut payload_buf = [0; Self::ENCODED_LEN];
27809        let mut buf = if avail_len < Self::ENCODED_LEN {
27810            payload_buf[0..avail_len].copy_from_slice(__input);
27811            Bytes::new(&payload_buf)
27812        } else {
27813            Bytes::new(__input)
27814        };
27815        let mut __struct = Self::default();
27816        __struct.time_boot_ms = buf.get_u32_le()?;
27817        __struct.xacc = buf.get_i16_le()?;
27818        __struct.yacc = buf.get_i16_le()?;
27819        __struct.zacc = buf.get_i16_le()?;
27820        __struct.xgyro = buf.get_i16_le()?;
27821        __struct.ygyro = buf.get_i16_le()?;
27822        __struct.zgyro = buf.get_i16_le()?;
27823        __struct.xmag = buf.get_i16_le()?;
27824        __struct.ymag = buf.get_i16_le()?;
27825        __struct.zmag = buf.get_i16_le()?;
27826        __struct.temperature = buf.get_i16_le()?;
27827        Ok(__struct)
27828    }
27829    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27830        let mut __tmp = BytesMut::new(bytes);
27831        #[allow(clippy::absurd_extreme_comparisons)]
27832        #[allow(unused_comparisons)]
27833        if __tmp.remaining() < Self::ENCODED_LEN {
27834            panic!(
27835                "buffer is too small (need {} bytes, but got {})",
27836                Self::ENCODED_LEN,
27837                __tmp.remaining(),
27838            )
27839        }
27840        __tmp.put_u32_le(self.time_boot_ms);
27841        __tmp.put_i16_le(self.xacc);
27842        __tmp.put_i16_le(self.yacc);
27843        __tmp.put_i16_le(self.zacc);
27844        __tmp.put_i16_le(self.xgyro);
27845        __tmp.put_i16_le(self.ygyro);
27846        __tmp.put_i16_le(self.zgyro);
27847        __tmp.put_i16_le(self.xmag);
27848        __tmp.put_i16_le(self.ymag);
27849        __tmp.put_i16_le(self.zmag);
27850        if matches!(version, MavlinkVersion::V2) {
27851            __tmp.put_i16_le(self.temperature);
27852            let len = __tmp.len();
27853            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27854        } else {
27855            __tmp.len()
27856        }
27857    }
27858}
27859#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
27860#[doc = ""]
27861#[doc = "ID: 116"]
27862#[derive(Debug, Clone, PartialEq)]
27863#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27864#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27865#[cfg_attr(feature = "ts", derive(TS))]
27866#[cfg_attr(feature = "ts", ts(export))]
27867pub struct SCALED_IMU2_DATA {
27868    #[doc = "Timestamp (time since system boot)."]
27869    pub time_boot_ms: u32,
27870    #[doc = "X acceleration"]
27871    pub xacc: i16,
27872    #[doc = "Y acceleration"]
27873    pub yacc: i16,
27874    #[doc = "Z acceleration"]
27875    pub zacc: i16,
27876    #[doc = "Angular speed around X axis"]
27877    pub xgyro: i16,
27878    #[doc = "Angular speed around Y axis"]
27879    pub ygyro: i16,
27880    #[doc = "Angular speed around Z axis"]
27881    pub zgyro: i16,
27882    #[doc = "X Magnetic field"]
27883    pub xmag: i16,
27884    #[doc = "Y Magnetic field"]
27885    pub ymag: i16,
27886    #[doc = "Z Magnetic field"]
27887    pub zmag: i16,
27888    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27889    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27890    pub temperature: i16,
27891}
27892impl SCALED_IMU2_DATA {
27893    pub const ENCODED_LEN: usize = 24usize;
27894    pub const DEFAULT: Self = Self {
27895        time_boot_ms: 0_u32,
27896        xacc: 0_i16,
27897        yacc: 0_i16,
27898        zacc: 0_i16,
27899        xgyro: 0_i16,
27900        ygyro: 0_i16,
27901        zgyro: 0_i16,
27902        xmag: 0_i16,
27903        ymag: 0_i16,
27904        zmag: 0_i16,
27905        temperature: 0_i16,
27906    };
27907    #[cfg(feature = "arbitrary")]
27908    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27909        use arbitrary::{Arbitrary, Unstructured};
27910        let mut buf = [0u8; 1024];
27911        rng.fill_bytes(&mut buf);
27912        let mut unstructured = Unstructured::new(&buf);
27913        Self::arbitrary(&mut unstructured).unwrap_or_default()
27914    }
27915}
27916impl Default for SCALED_IMU2_DATA {
27917    fn default() -> Self {
27918        Self::DEFAULT.clone()
27919    }
27920}
27921impl MessageData for SCALED_IMU2_DATA {
27922    type Message = MavMessage;
27923    const ID: u32 = 116u32;
27924    const NAME: &'static str = "SCALED_IMU2";
27925    const EXTRA_CRC: u8 = 76u8;
27926    const ENCODED_LEN: usize = 24usize;
27927    fn deser(
27928        _version: MavlinkVersion,
27929        __input: &[u8],
27930    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27931        let avail_len = __input.len();
27932        let mut payload_buf = [0; Self::ENCODED_LEN];
27933        let mut buf = if avail_len < Self::ENCODED_LEN {
27934            payload_buf[0..avail_len].copy_from_slice(__input);
27935            Bytes::new(&payload_buf)
27936        } else {
27937            Bytes::new(__input)
27938        };
27939        let mut __struct = Self::default();
27940        __struct.time_boot_ms = buf.get_u32_le()?;
27941        __struct.xacc = buf.get_i16_le()?;
27942        __struct.yacc = buf.get_i16_le()?;
27943        __struct.zacc = buf.get_i16_le()?;
27944        __struct.xgyro = buf.get_i16_le()?;
27945        __struct.ygyro = buf.get_i16_le()?;
27946        __struct.zgyro = buf.get_i16_le()?;
27947        __struct.xmag = buf.get_i16_le()?;
27948        __struct.ymag = buf.get_i16_le()?;
27949        __struct.zmag = buf.get_i16_le()?;
27950        __struct.temperature = buf.get_i16_le()?;
27951        Ok(__struct)
27952    }
27953    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27954        let mut __tmp = BytesMut::new(bytes);
27955        #[allow(clippy::absurd_extreme_comparisons)]
27956        #[allow(unused_comparisons)]
27957        if __tmp.remaining() < Self::ENCODED_LEN {
27958            panic!(
27959                "buffer is too small (need {} bytes, but got {})",
27960                Self::ENCODED_LEN,
27961                __tmp.remaining(),
27962            )
27963        }
27964        __tmp.put_u32_le(self.time_boot_ms);
27965        __tmp.put_i16_le(self.xacc);
27966        __tmp.put_i16_le(self.yacc);
27967        __tmp.put_i16_le(self.zacc);
27968        __tmp.put_i16_le(self.xgyro);
27969        __tmp.put_i16_le(self.ygyro);
27970        __tmp.put_i16_le(self.zgyro);
27971        __tmp.put_i16_le(self.xmag);
27972        __tmp.put_i16_le(self.ymag);
27973        __tmp.put_i16_le(self.zmag);
27974        if matches!(version, MavlinkVersion::V2) {
27975            __tmp.put_i16_le(self.temperature);
27976            let len = __tmp.len();
27977            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27978        } else {
27979            __tmp.len()
27980        }
27981    }
27982}
27983#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27984#[doc = ""]
27985#[doc = "ID: 129"]
27986#[derive(Debug, Clone, PartialEq)]
27987#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27988#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27989#[cfg_attr(feature = "ts", derive(TS))]
27990#[cfg_attr(feature = "ts", ts(export))]
27991pub struct SCALED_IMU3_DATA {
27992    #[doc = "Timestamp (time since system boot)."]
27993    pub time_boot_ms: u32,
27994    #[doc = "X acceleration"]
27995    pub xacc: i16,
27996    #[doc = "Y acceleration"]
27997    pub yacc: i16,
27998    #[doc = "Z acceleration"]
27999    pub zacc: i16,
28000    #[doc = "Angular speed around X axis"]
28001    pub xgyro: i16,
28002    #[doc = "Angular speed around Y axis"]
28003    pub ygyro: i16,
28004    #[doc = "Angular speed around Z axis"]
28005    pub zgyro: i16,
28006    #[doc = "X Magnetic field"]
28007    pub xmag: i16,
28008    #[doc = "Y Magnetic field"]
28009    pub ymag: i16,
28010    #[doc = "Z Magnetic field"]
28011    pub zmag: i16,
28012    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
28013    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28014    pub temperature: i16,
28015}
28016impl SCALED_IMU3_DATA {
28017    pub const ENCODED_LEN: usize = 24usize;
28018    pub const DEFAULT: Self = Self {
28019        time_boot_ms: 0_u32,
28020        xacc: 0_i16,
28021        yacc: 0_i16,
28022        zacc: 0_i16,
28023        xgyro: 0_i16,
28024        ygyro: 0_i16,
28025        zgyro: 0_i16,
28026        xmag: 0_i16,
28027        ymag: 0_i16,
28028        zmag: 0_i16,
28029        temperature: 0_i16,
28030    };
28031    #[cfg(feature = "arbitrary")]
28032    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28033        use arbitrary::{Arbitrary, Unstructured};
28034        let mut buf = [0u8; 1024];
28035        rng.fill_bytes(&mut buf);
28036        let mut unstructured = Unstructured::new(&buf);
28037        Self::arbitrary(&mut unstructured).unwrap_or_default()
28038    }
28039}
28040impl Default for SCALED_IMU3_DATA {
28041    fn default() -> Self {
28042        Self::DEFAULT.clone()
28043    }
28044}
28045impl MessageData for SCALED_IMU3_DATA {
28046    type Message = MavMessage;
28047    const ID: u32 = 129u32;
28048    const NAME: &'static str = "SCALED_IMU3";
28049    const EXTRA_CRC: u8 = 46u8;
28050    const ENCODED_LEN: usize = 24usize;
28051    fn deser(
28052        _version: MavlinkVersion,
28053        __input: &[u8],
28054    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28055        let avail_len = __input.len();
28056        let mut payload_buf = [0; Self::ENCODED_LEN];
28057        let mut buf = if avail_len < Self::ENCODED_LEN {
28058            payload_buf[0..avail_len].copy_from_slice(__input);
28059            Bytes::new(&payload_buf)
28060        } else {
28061            Bytes::new(__input)
28062        };
28063        let mut __struct = Self::default();
28064        __struct.time_boot_ms = buf.get_u32_le()?;
28065        __struct.xacc = buf.get_i16_le()?;
28066        __struct.yacc = buf.get_i16_le()?;
28067        __struct.zacc = buf.get_i16_le()?;
28068        __struct.xgyro = buf.get_i16_le()?;
28069        __struct.ygyro = buf.get_i16_le()?;
28070        __struct.zgyro = buf.get_i16_le()?;
28071        __struct.xmag = buf.get_i16_le()?;
28072        __struct.ymag = buf.get_i16_le()?;
28073        __struct.zmag = buf.get_i16_le()?;
28074        __struct.temperature = buf.get_i16_le()?;
28075        Ok(__struct)
28076    }
28077    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28078        let mut __tmp = BytesMut::new(bytes);
28079        #[allow(clippy::absurd_extreme_comparisons)]
28080        #[allow(unused_comparisons)]
28081        if __tmp.remaining() < Self::ENCODED_LEN {
28082            panic!(
28083                "buffer is too small (need {} bytes, but got {})",
28084                Self::ENCODED_LEN,
28085                __tmp.remaining(),
28086            )
28087        }
28088        __tmp.put_u32_le(self.time_boot_ms);
28089        __tmp.put_i16_le(self.xacc);
28090        __tmp.put_i16_le(self.yacc);
28091        __tmp.put_i16_le(self.zacc);
28092        __tmp.put_i16_le(self.xgyro);
28093        __tmp.put_i16_le(self.ygyro);
28094        __tmp.put_i16_le(self.zgyro);
28095        __tmp.put_i16_le(self.xmag);
28096        __tmp.put_i16_le(self.ymag);
28097        __tmp.put_i16_le(self.zmag);
28098        if matches!(version, MavlinkVersion::V2) {
28099            __tmp.put_i16_le(self.temperature);
28100            let len = __tmp.len();
28101            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28102        } else {
28103            __tmp.len()
28104        }
28105    }
28106}
28107#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
28108#[doc = ""]
28109#[doc = "ID: 29"]
28110#[derive(Debug, Clone, PartialEq)]
28111#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28113#[cfg_attr(feature = "ts", derive(TS))]
28114#[cfg_attr(feature = "ts", ts(export))]
28115pub struct SCALED_PRESSURE_DATA {
28116    #[doc = "Timestamp (time since system boot)."]
28117    pub time_boot_ms: u32,
28118    #[doc = "Absolute pressure"]
28119    pub press_abs: f32,
28120    #[doc = "Differential pressure 1"]
28121    pub press_diff: f32,
28122    #[doc = "Absolute pressure temperature"]
28123    pub temperature: i16,
28124    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
28125    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28126    pub temperature_press_diff: i16,
28127}
28128impl SCALED_PRESSURE_DATA {
28129    pub const ENCODED_LEN: usize = 16usize;
28130    pub const DEFAULT: Self = Self {
28131        time_boot_ms: 0_u32,
28132        press_abs: 0.0_f32,
28133        press_diff: 0.0_f32,
28134        temperature: 0_i16,
28135        temperature_press_diff: 0_i16,
28136    };
28137    #[cfg(feature = "arbitrary")]
28138    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28139        use arbitrary::{Arbitrary, Unstructured};
28140        let mut buf = [0u8; 1024];
28141        rng.fill_bytes(&mut buf);
28142        let mut unstructured = Unstructured::new(&buf);
28143        Self::arbitrary(&mut unstructured).unwrap_or_default()
28144    }
28145}
28146impl Default for SCALED_PRESSURE_DATA {
28147    fn default() -> Self {
28148        Self::DEFAULT.clone()
28149    }
28150}
28151impl MessageData for SCALED_PRESSURE_DATA {
28152    type Message = MavMessage;
28153    const ID: u32 = 29u32;
28154    const NAME: &'static str = "SCALED_PRESSURE";
28155    const EXTRA_CRC: u8 = 115u8;
28156    const ENCODED_LEN: usize = 16usize;
28157    fn deser(
28158        _version: MavlinkVersion,
28159        __input: &[u8],
28160    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28161        let avail_len = __input.len();
28162        let mut payload_buf = [0; Self::ENCODED_LEN];
28163        let mut buf = if avail_len < Self::ENCODED_LEN {
28164            payload_buf[0..avail_len].copy_from_slice(__input);
28165            Bytes::new(&payload_buf)
28166        } else {
28167            Bytes::new(__input)
28168        };
28169        let mut __struct = Self::default();
28170        __struct.time_boot_ms = buf.get_u32_le()?;
28171        __struct.press_abs = buf.get_f32_le()?;
28172        __struct.press_diff = buf.get_f32_le()?;
28173        __struct.temperature = buf.get_i16_le()?;
28174        __struct.temperature_press_diff = buf.get_i16_le()?;
28175        Ok(__struct)
28176    }
28177    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28178        let mut __tmp = BytesMut::new(bytes);
28179        #[allow(clippy::absurd_extreme_comparisons)]
28180        #[allow(unused_comparisons)]
28181        if __tmp.remaining() < Self::ENCODED_LEN {
28182            panic!(
28183                "buffer is too small (need {} bytes, but got {})",
28184                Self::ENCODED_LEN,
28185                __tmp.remaining(),
28186            )
28187        }
28188        __tmp.put_u32_le(self.time_boot_ms);
28189        __tmp.put_f32_le(self.press_abs);
28190        __tmp.put_f32_le(self.press_diff);
28191        __tmp.put_i16_le(self.temperature);
28192        if matches!(version, MavlinkVersion::V2) {
28193            __tmp.put_i16_le(self.temperature_press_diff);
28194            let len = __tmp.len();
28195            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28196        } else {
28197            __tmp.len()
28198        }
28199    }
28200}
28201#[doc = "Barometer readings for 2nd barometer."]
28202#[doc = ""]
28203#[doc = "ID: 137"]
28204#[derive(Debug, Clone, PartialEq)]
28205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28207#[cfg_attr(feature = "ts", derive(TS))]
28208#[cfg_attr(feature = "ts", ts(export))]
28209pub struct SCALED_PRESSURE2_DATA {
28210    #[doc = "Timestamp (time since system boot)."]
28211    pub time_boot_ms: u32,
28212    #[doc = "Absolute pressure"]
28213    pub press_abs: f32,
28214    #[doc = "Differential pressure"]
28215    pub press_diff: f32,
28216    #[doc = "Absolute pressure temperature"]
28217    pub temperature: i16,
28218    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
28219    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28220    pub temperature_press_diff: i16,
28221}
28222impl SCALED_PRESSURE2_DATA {
28223    pub const ENCODED_LEN: usize = 16usize;
28224    pub const DEFAULT: Self = Self {
28225        time_boot_ms: 0_u32,
28226        press_abs: 0.0_f32,
28227        press_diff: 0.0_f32,
28228        temperature: 0_i16,
28229        temperature_press_diff: 0_i16,
28230    };
28231    #[cfg(feature = "arbitrary")]
28232    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28233        use arbitrary::{Arbitrary, Unstructured};
28234        let mut buf = [0u8; 1024];
28235        rng.fill_bytes(&mut buf);
28236        let mut unstructured = Unstructured::new(&buf);
28237        Self::arbitrary(&mut unstructured).unwrap_or_default()
28238    }
28239}
28240impl Default for SCALED_PRESSURE2_DATA {
28241    fn default() -> Self {
28242        Self::DEFAULT.clone()
28243    }
28244}
28245impl MessageData for SCALED_PRESSURE2_DATA {
28246    type Message = MavMessage;
28247    const ID: u32 = 137u32;
28248    const NAME: &'static str = "SCALED_PRESSURE2";
28249    const EXTRA_CRC: u8 = 195u8;
28250    const ENCODED_LEN: usize = 16usize;
28251    fn deser(
28252        _version: MavlinkVersion,
28253        __input: &[u8],
28254    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28255        let avail_len = __input.len();
28256        let mut payload_buf = [0; Self::ENCODED_LEN];
28257        let mut buf = if avail_len < Self::ENCODED_LEN {
28258            payload_buf[0..avail_len].copy_from_slice(__input);
28259            Bytes::new(&payload_buf)
28260        } else {
28261            Bytes::new(__input)
28262        };
28263        let mut __struct = Self::default();
28264        __struct.time_boot_ms = buf.get_u32_le()?;
28265        __struct.press_abs = buf.get_f32_le()?;
28266        __struct.press_diff = buf.get_f32_le()?;
28267        __struct.temperature = buf.get_i16_le()?;
28268        __struct.temperature_press_diff = buf.get_i16_le()?;
28269        Ok(__struct)
28270    }
28271    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28272        let mut __tmp = BytesMut::new(bytes);
28273        #[allow(clippy::absurd_extreme_comparisons)]
28274        #[allow(unused_comparisons)]
28275        if __tmp.remaining() < Self::ENCODED_LEN {
28276            panic!(
28277                "buffer is too small (need {} bytes, but got {})",
28278                Self::ENCODED_LEN,
28279                __tmp.remaining(),
28280            )
28281        }
28282        __tmp.put_u32_le(self.time_boot_ms);
28283        __tmp.put_f32_le(self.press_abs);
28284        __tmp.put_f32_le(self.press_diff);
28285        __tmp.put_i16_le(self.temperature);
28286        if matches!(version, MavlinkVersion::V2) {
28287            __tmp.put_i16_le(self.temperature_press_diff);
28288            let len = __tmp.len();
28289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28290        } else {
28291            __tmp.len()
28292        }
28293    }
28294}
28295#[doc = "Barometer readings for 3rd barometer."]
28296#[doc = ""]
28297#[doc = "ID: 143"]
28298#[derive(Debug, Clone, PartialEq)]
28299#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28301#[cfg_attr(feature = "ts", derive(TS))]
28302#[cfg_attr(feature = "ts", ts(export))]
28303pub struct SCALED_PRESSURE3_DATA {
28304    #[doc = "Timestamp (time since system boot)."]
28305    pub time_boot_ms: u32,
28306    #[doc = "Absolute pressure"]
28307    pub press_abs: f32,
28308    #[doc = "Differential pressure"]
28309    pub press_diff: f32,
28310    #[doc = "Absolute pressure temperature"]
28311    pub temperature: i16,
28312    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
28313    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28314    pub temperature_press_diff: i16,
28315}
28316impl SCALED_PRESSURE3_DATA {
28317    pub const ENCODED_LEN: usize = 16usize;
28318    pub const DEFAULT: Self = Self {
28319        time_boot_ms: 0_u32,
28320        press_abs: 0.0_f32,
28321        press_diff: 0.0_f32,
28322        temperature: 0_i16,
28323        temperature_press_diff: 0_i16,
28324    };
28325    #[cfg(feature = "arbitrary")]
28326    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28327        use arbitrary::{Arbitrary, Unstructured};
28328        let mut buf = [0u8; 1024];
28329        rng.fill_bytes(&mut buf);
28330        let mut unstructured = Unstructured::new(&buf);
28331        Self::arbitrary(&mut unstructured).unwrap_or_default()
28332    }
28333}
28334impl Default for SCALED_PRESSURE3_DATA {
28335    fn default() -> Self {
28336        Self::DEFAULT.clone()
28337    }
28338}
28339impl MessageData for SCALED_PRESSURE3_DATA {
28340    type Message = MavMessage;
28341    const ID: u32 = 143u32;
28342    const NAME: &'static str = "SCALED_PRESSURE3";
28343    const EXTRA_CRC: u8 = 131u8;
28344    const ENCODED_LEN: usize = 16usize;
28345    fn deser(
28346        _version: MavlinkVersion,
28347        __input: &[u8],
28348    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28349        let avail_len = __input.len();
28350        let mut payload_buf = [0; Self::ENCODED_LEN];
28351        let mut buf = if avail_len < Self::ENCODED_LEN {
28352            payload_buf[0..avail_len].copy_from_slice(__input);
28353            Bytes::new(&payload_buf)
28354        } else {
28355            Bytes::new(__input)
28356        };
28357        let mut __struct = Self::default();
28358        __struct.time_boot_ms = buf.get_u32_le()?;
28359        __struct.press_abs = buf.get_f32_le()?;
28360        __struct.press_diff = buf.get_f32_le()?;
28361        __struct.temperature = buf.get_i16_le()?;
28362        __struct.temperature_press_diff = buf.get_i16_le()?;
28363        Ok(__struct)
28364    }
28365    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28366        let mut __tmp = BytesMut::new(bytes);
28367        #[allow(clippy::absurd_extreme_comparisons)]
28368        #[allow(unused_comparisons)]
28369        if __tmp.remaining() < Self::ENCODED_LEN {
28370            panic!(
28371                "buffer is too small (need {} bytes, but got {})",
28372                Self::ENCODED_LEN,
28373                __tmp.remaining(),
28374            )
28375        }
28376        __tmp.put_u32_le(self.time_boot_ms);
28377        __tmp.put_f32_le(self.press_abs);
28378        __tmp.put_f32_le(self.press_diff);
28379        __tmp.put_i16_le(self.temperature);
28380        if matches!(version, MavlinkVersion::V2) {
28381            __tmp.put_i16_le(self.temperature_press_diff);
28382            let len = __tmp.len();
28383            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28384        } else {
28385            __tmp.len()
28386        }
28387    }
28388}
28389#[doc = "Monitoring of sensorpod status."]
28390#[doc = ""]
28391#[doc = "ID: 8012"]
28392#[derive(Debug, Clone, PartialEq)]
28393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28395#[cfg_attr(feature = "ts", derive(TS))]
28396#[cfg_attr(feature = "ts", ts(export))]
28397pub struct SENSORPOD_STATUS_DATA {
28398    #[doc = "Timestamp in linuxtime (since 1.1.1970)"]
28399    pub timestamp: u64,
28400    #[doc = "Free space available in recordings directory in [Gb] * 1e2"]
28401    pub free_space: u16,
28402    #[doc = "Rate of ROS topic 1"]
28403    pub visensor_rate_1: u8,
28404    #[doc = "Rate of ROS topic 2"]
28405    pub visensor_rate_2: u8,
28406    #[doc = "Rate of ROS topic 3"]
28407    pub visensor_rate_3: u8,
28408    #[doc = "Rate of ROS topic 4"]
28409    pub visensor_rate_4: u8,
28410    #[doc = "Number of recording nodes"]
28411    pub recording_nodes_count: u8,
28412    #[doc = "Temperature of sensorpod CPU in"]
28413    pub cpu_temp: u8,
28414}
28415impl SENSORPOD_STATUS_DATA {
28416    pub const ENCODED_LEN: usize = 16usize;
28417    pub const DEFAULT: Self = Self {
28418        timestamp: 0_u64,
28419        free_space: 0_u16,
28420        visensor_rate_1: 0_u8,
28421        visensor_rate_2: 0_u8,
28422        visensor_rate_3: 0_u8,
28423        visensor_rate_4: 0_u8,
28424        recording_nodes_count: 0_u8,
28425        cpu_temp: 0_u8,
28426    };
28427    #[cfg(feature = "arbitrary")]
28428    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28429        use arbitrary::{Arbitrary, Unstructured};
28430        let mut buf = [0u8; 1024];
28431        rng.fill_bytes(&mut buf);
28432        let mut unstructured = Unstructured::new(&buf);
28433        Self::arbitrary(&mut unstructured).unwrap_or_default()
28434    }
28435}
28436impl Default for SENSORPOD_STATUS_DATA {
28437    fn default() -> Self {
28438        Self::DEFAULT.clone()
28439    }
28440}
28441impl MessageData for SENSORPOD_STATUS_DATA {
28442    type Message = MavMessage;
28443    const ID: u32 = 8012u32;
28444    const NAME: &'static str = "SENSORPOD_STATUS";
28445    const EXTRA_CRC: u8 = 54u8;
28446    const ENCODED_LEN: usize = 16usize;
28447    fn deser(
28448        _version: MavlinkVersion,
28449        __input: &[u8],
28450    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28451        let avail_len = __input.len();
28452        let mut payload_buf = [0; Self::ENCODED_LEN];
28453        let mut buf = if avail_len < Self::ENCODED_LEN {
28454            payload_buf[0..avail_len].copy_from_slice(__input);
28455            Bytes::new(&payload_buf)
28456        } else {
28457            Bytes::new(__input)
28458        };
28459        let mut __struct = Self::default();
28460        __struct.timestamp = buf.get_u64_le()?;
28461        __struct.free_space = buf.get_u16_le()?;
28462        __struct.visensor_rate_1 = buf.get_u8()?;
28463        __struct.visensor_rate_2 = buf.get_u8()?;
28464        __struct.visensor_rate_3 = buf.get_u8()?;
28465        __struct.visensor_rate_4 = buf.get_u8()?;
28466        __struct.recording_nodes_count = buf.get_u8()?;
28467        __struct.cpu_temp = buf.get_u8()?;
28468        Ok(__struct)
28469    }
28470    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28471        let mut __tmp = BytesMut::new(bytes);
28472        #[allow(clippy::absurd_extreme_comparisons)]
28473        #[allow(unused_comparisons)]
28474        if __tmp.remaining() < Self::ENCODED_LEN {
28475            panic!(
28476                "buffer is too small (need {} bytes, but got {})",
28477                Self::ENCODED_LEN,
28478                __tmp.remaining(),
28479            )
28480        }
28481        __tmp.put_u64_le(self.timestamp);
28482        __tmp.put_u16_le(self.free_space);
28483        __tmp.put_u8(self.visensor_rate_1);
28484        __tmp.put_u8(self.visensor_rate_2);
28485        __tmp.put_u8(self.visensor_rate_3);
28486        __tmp.put_u8(self.visensor_rate_4);
28487        __tmp.put_u8(self.recording_nodes_count);
28488        __tmp.put_u8(self.cpu_temp);
28489        if matches!(version, MavlinkVersion::V2) {
28490            let len = __tmp.len();
28491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28492        } else {
28493            __tmp.len()
28494        }
28495    }
28496}
28497#[doc = "Calibrated airflow angle measurements."]
28498#[doc = ""]
28499#[doc = "ID: 8016"]
28500#[derive(Debug, Clone, PartialEq)]
28501#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28502#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28503#[cfg_attr(feature = "ts", derive(TS))]
28504#[cfg_attr(feature = "ts", ts(export))]
28505pub struct SENSOR_AIRFLOW_ANGLES_DATA {
28506    #[doc = "Timestamp"]
28507    pub timestamp: u64,
28508    #[doc = "Angle of attack"]
28509    pub angleofattack: f32,
28510    #[doc = "Sideslip angle"]
28511    pub sideslip: f32,
28512    #[doc = "Angle of attack measurement valid"]
28513    pub angleofattack_valid: u8,
28514    #[doc = "Sideslip angle measurement valid"]
28515    pub sideslip_valid: u8,
28516}
28517impl SENSOR_AIRFLOW_ANGLES_DATA {
28518    pub const ENCODED_LEN: usize = 18usize;
28519    pub const DEFAULT: Self = Self {
28520        timestamp: 0_u64,
28521        angleofattack: 0.0_f32,
28522        sideslip: 0.0_f32,
28523        angleofattack_valid: 0_u8,
28524        sideslip_valid: 0_u8,
28525    };
28526    #[cfg(feature = "arbitrary")]
28527    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28528        use arbitrary::{Arbitrary, Unstructured};
28529        let mut buf = [0u8; 1024];
28530        rng.fill_bytes(&mut buf);
28531        let mut unstructured = Unstructured::new(&buf);
28532        Self::arbitrary(&mut unstructured).unwrap_or_default()
28533    }
28534}
28535impl Default for SENSOR_AIRFLOW_ANGLES_DATA {
28536    fn default() -> Self {
28537        Self::DEFAULT.clone()
28538    }
28539}
28540impl MessageData for SENSOR_AIRFLOW_ANGLES_DATA {
28541    type Message = MavMessage;
28542    const ID: u32 = 8016u32;
28543    const NAME: &'static str = "SENSOR_AIRFLOW_ANGLES";
28544    const EXTRA_CRC: u8 = 149u8;
28545    const ENCODED_LEN: usize = 18usize;
28546    fn deser(
28547        _version: MavlinkVersion,
28548        __input: &[u8],
28549    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28550        let avail_len = __input.len();
28551        let mut payload_buf = [0; Self::ENCODED_LEN];
28552        let mut buf = if avail_len < Self::ENCODED_LEN {
28553            payload_buf[0..avail_len].copy_from_slice(__input);
28554            Bytes::new(&payload_buf)
28555        } else {
28556            Bytes::new(__input)
28557        };
28558        let mut __struct = Self::default();
28559        __struct.timestamp = buf.get_u64_le()?;
28560        __struct.angleofattack = buf.get_f32_le()?;
28561        __struct.sideslip = buf.get_f32_le()?;
28562        __struct.angleofattack_valid = buf.get_u8()?;
28563        __struct.sideslip_valid = buf.get_u8()?;
28564        Ok(__struct)
28565    }
28566    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28567        let mut __tmp = BytesMut::new(bytes);
28568        #[allow(clippy::absurd_extreme_comparisons)]
28569        #[allow(unused_comparisons)]
28570        if __tmp.remaining() < Self::ENCODED_LEN {
28571            panic!(
28572                "buffer is too small (need {} bytes, but got {})",
28573                Self::ENCODED_LEN,
28574                __tmp.remaining(),
28575            )
28576        }
28577        __tmp.put_u64_le(self.timestamp);
28578        __tmp.put_f32_le(self.angleofattack);
28579        __tmp.put_f32_le(self.sideslip);
28580        __tmp.put_u8(self.angleofattack_valid);
28581        __tmp.put_u8(self.sideslip_valid);
28582        if matches!(version, MavlinkVersion::V2) {
28583            let len = __tmp.len();
28584            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28585        } else {
28586            __tmp.len()
28587        }
28588    }
28589}
28590#[doc = "Atmospheric sensors (temperature, humidity, ...)."]
28591#[doc = ""]
28592#[doc = "ID: 8009"]
28593#[derive(Debug, Clone, PartialEq)]
28594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28596#[cfg_attr(feature = "ts", derive(TS))]
28597#[cfg_attr(feature = "ts", ts(export))]
28598pub struct SENS_ATMOS_DATA {
28599    #[doc = "Time since system boot"]
28600    pub timestamp: u64,
28601    #[doc = "Ambient temperature"]
28602    pub TempAmbient: f32,
28603    #[doc = "Relative humidity"]
28604    pub Humidity: f32,
28605}
28606impl SENS_ATMOS_DATA {
28607    pub const ENCODED_LEN: usize = 16usize;
28608    pub const DEFAULT: Self = Self {
28609        timestamp: 0_u64,
28610        TempAmbient: 0.0_f32,
28611        Humidity: 0.0_f32,
28612    };
28613    #[cfg(feature = "arbitrary")]
28614    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28615        use arbitrary::{Arbitrary, Unstructured};
28616        let mut buf = [0u8; 1024];
28617        rng.fill_bytes(&mut buf);
28618        let mut unstructured = Unstructured::new(&buf);
28619        Self::arbitrary(&mut unstructured).unwrap_or_default()
28620    }
28621}
28622impl Default for SENS_ATMOS_DATA {
28623    fn default() -> Self {
28624        Self::DEFAULT.clone()
28625    }
28626}
28627impl MessageData for SENS_ATMOS_DATA {
28628    type Message = MavMessage;
28629    const ID: u32 = 8009u32;
28630    const NAME: &'static str = "SENS_ATMOS";
28631    const EXTRA_CRC: u8 = 144u8;
28632    const ENCODED_LEN: usize = 16usize;
28633    fn deser(
28634        _version: MavlinkVersion,
28635        __input: &[u8],
28636    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28637        let avail_len = __input.len();
28638        let mut payload_buf = [0; Self::ENCODED_LEN];
28639        let mut buf = if avail_len < Self::ENCODED_LEN {
28640            payload_buf[0..avail_len].copy_from_slice(__input);
28641            Bytes::new(&payload_buf)
28642        } else {
28643            Bytes::new(__input)
28644        };
28645        let mut __struct = Self::default();
28646        __struct.timestamp = buf.get_u64_le()?;
28647        __struct.TempAmbient = buf.get_f32_le()?;
28648        __struct.Humidity = buf.get_f32_le()?;
28649        Ok(__struct)
28650    }
28651    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28652        let mut __tmp = BytesMut::new(bytes);
28653        #[allow(clippy::absurd_extreme_comparisons)]
28654        #[allow(unused_comparisons)]
28655        if __tmp.remaining() < Self::ENCODED_LEN {
28656            panic!(
28657                "buffer is too small (need {} bytes, but got {})",
28658                Self::ENCODED_LEN,
28659                __tmp.remaining(),
28660            )
28661        }
28662        __tmp.put_u64_le(self.timestamp);
28663        __tmp.put_f32_le(self.TempAmbient);
28664        __tmp.put_f32_le(self.Humidity);
28665        if matches!(version, MavlinkVersion::V2) {
28666            let len = __tmp.len();
28667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28668        } else {
28669            __tmp.len()
28670        }
28671    }
28672}
28673#[doc = "Battery pack monitoring data for Li-Ion batteries."]
28674#[doc = ""]
28675#[doc = "ID: 8010"]
28676#[derive(Debug, Clone, PartialEq)]
28677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28679#[cfg_attr(feature = "ts", derive(TS))]
28680#[cfg_attr(feature = "ts", ts(export))]
28681pub struct SENS_BATMON_DATA {
28682    #[doc = "Time since system start"]
28683    pub batmon_timestamp: u64,
28684    #[doc = "Battery pack temperature"]
28685    pub temperature: f32,
28686    #[doc = "Battery monitor safetystatus report bits in Hex"]
28687    pub safetystatus: u32,
28688    #[doc = "Battery monitor operation status report bits in Hex"]
28689    pub operationstatus: u32,
28690    #[doc = "Battery pack voltage"]
28691    pub voltage: u16,
28692    #[doc = "Battery pack current"]
28693    pub current: i16,
28694    #[doc = "Battery monitor status report bits in Hex"]
28695    pub batterystatus: u16,
28696    #[doc = "Battery monitor serial number in Hex"]
28697    pub serialnumber: u16,
28698    #[doc = "Battery pack cell 1 voltage"]
28699    pub cellvoltage1: u16,
28700    #[doc = "Battery pack cell 2 voltage"]
28701    pub cellvoltage2: u16,
28702    #[doc = "Battery pack cell 3 voltage"]
28703    pub cellvoltage3: u16,
28704    #[doc = "Battery pack cell 4 voltage"]
28705    pub cellvoltage4: u16,
28706    #[doc = "Battery pack cell 5 voltage"]
28707    pub cellvoltage5: u16,
28708    #[doc = "Battery pack cell 6 voltage"]
28709    pub cellvoltage6: u16,
28710    #[doc = "Battery pack state-of-charge"]
28711    pub SoC: u8,
28712}
28713impl SENS_BATMON_DATA {
28714    pub const ENCODED_LEN: usize = 41usize;
28715    pub const DEFAULT: Self = Self {
28716        batmon_timestamp: 0_u64,
28717        temperature: 0.0_f32,
28718        safetystatus: 0_u32,
28719        operationstatus: 0_u32,
28720        voltage: 0_u16,
28721        current: 0_i16,
28722        batterystatus: 0_u16,
28723        serialnumber: 0_u16,
28724        cellvoltage1: 0_u16,
28725        cellvoltage2: 0_u16,
28726        cellvoltage3: 0_u16,
28727        cellvoltage4: 0_u16,
28728        cellvoltage5: 0_u16,
28729        cellvoltage6: 0_u16,
28730        SoC: 0_u8,
28731    };
28732    #[cfg(feature = "arbitrary")]
28733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28734        use arbitrary::{Arbitrary, Unstructured};
28735        let mut buf = [0u8; 1024];
28736        rng.fill_bytes(&mut buf);
28737        let mut unstructured = Unstructured::new(&buf);
28738        Self::arbitrary(&mut unstructured).unwrap_or_default()
28739    }
28740}
28741impl Default for SENS_BATMON_DATA {
28742    fn default() -> Self {
28743        Self::DEFAULT.clone()
28744    }
28745}
28746impl MessageData for SENS_BATMON_DATA {
28747    type Message = MavMessage;
28748    const ID: u32 = 8010u32;
28749    const NAME: &'static str = "SENS_BATMON";
28750    const EXTRA_CRC: u8 = 155u8;
28751    const ENCODED_LEN: usize = 41usize;
28752    fn deser(
28753        _version: MavlinkVersion,
28754        __input: &[u8],
28755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28756        let avail_len = __input.len();
28757        let mut payload_buf = [0; Self::ENCODED_LEN];
28758        let mut buf = if avail_len < Self::ENCODED_LEN {
28759            payload_buf[0..avail_len].copy_from_slice(__input);
28760            Bytes::new(&payload_buf)
28761        } else {
28762            Bytes::new(__input)
28763        };
28764        let mut __struct = Self::default();
28765        __struct.batmon_timestamp = buf.get_u64_le()?;
28766        __struct.temperature = buf.get_f32_le()?;
28767        __struct.safetystatus = buf.get_u32_le()?;
28768        __struct.operationstatus = buf.get_u32_le()?;
28769        __struct.voltage = buf.get_u16_le()?;
28770        __struct.current = buf.get_i16_le()?;
28771        __struct.batterystatus = buf.get_u16_le()?;
28772        __struct.serialnumber = buf.get_u16_le()?;
28773        __struct.cellvoltage1 = buf.get_u16_le()?;
28774        __struct.cellvoltage2 = buf.get_u16_le()?;
28775        __struct.cellvoltage3 = buf.get_u16_le()?;
28776        __struct.cellvoltage4 = buf.get_u16_le()?;
28777        __struct.cellvoltage5 = buf.get_u16_le()?;
28778        __struct.cellvoltage6 = buf.get_u16_le()?;
28779        __struct.SoC = buf.get_u8()?;
28780        Ok(__struct)
28781    }
28782    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28783        let mut __tmp = BytesMut::new(bytes);
28784        #[allow(clippy::absurd_extreme_comparisons)]
28785        #[allow(unused_comparisons)]
28786        if __tmp.remaining() < Self::ENCODED_LEN {
28787            panic!(
28788                "buffer is too small (need {} bytes, but got {})",
28789                Self::ENCODED_LEN,
28790                __tmp.remaining(),
28791            )
28792        }
28793        __tmp.put_u64_le(self.batmon_timestamp);
28794        __tmp.put_f32_le(self.temperature);
28795        __tmp.put_u32_le(self.safetystatus);
28796        __tmp.put_u32_le(self.operationstatus);
28797        __tmp.put_u16_le(self.voltage);
28798        __tmp.put_i16_le(self.current);
28799        __tmp.put_u16_le(self.batterystatus);
28800        __tmp.put_u16_le(self.serialnumber);
28801        __tmp.put_u16_le(self.cellvoltage1);
28802        __tmp.put_u16_le(self.cellvoltage2);
28803        __tmp.put_u16_le(self.cellvoltage3);
28804        __tmp.put_u16_le(self.cellvoltage4);
28805        __tmp.put_u16_le(self.cellvoltage5);
28806        __tmp.put_u16_le(self.cellvoltage6);
28807        __tmp.put_u8(self.SoC);
28808        if matches!(version, MavlinkVersion::V2) {
28809            let len = __tmp.len();
28810            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28811        } else {
28812            __tmp.len()
28813        }
28814    }
28815}
28816#[doc = "Maximum Power Point Tracker (MPPT) sensor data for solar module power performance tracking."]
28817#[doc = ""]
28818#[doc = "ID: 8003"]
28819#[derive(Debug, Clone, PartialEq)]
28820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28821#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28822#[cfg_attr(feature = "ts", derive(TS))]
28823#[cfg_attr(feature = "ts", ts(export))]
28824pub struct SENS_MPPT_DATA {
28825    #[doc = "MPPT last timestamp"]
28826    pub mppt_timestamp: u64,
28827    #[doc = "MPPT1 voltage"]
28828    pub mppt1_volt: f32,
28829    #[doc = "MPPT1 current"]
28830    pub mppt1_amp: f32,
28831    #[doc = "MPPT2 voltage"]
28832    pub mppt2_volt: f32,
28833    #[doc = "MPPT2 current"]
28834    pub mppt2_amp: f32,
28835    #[doc = "MPPT3 voltage"]
28836    pub mppt3_volt: f32,
28837    #[doc = "MPPT3 current"]
28838    pub mppt3_amp: f32,
28839    #[doc = "MPPT1 pwm"]
28840    pub mppt1_pwm: u16,
28841    #[doc = "MPPT2 pwm"]
28842    pub mppt2_pwm: u16,
28843    #[doc = "MPPT3 pwm"]
28844    pub mppt3_pwm: u16,
28845    #[doc = "MPPT1 status"]
28846    pub mppt1_status: u8,
28847    #[doc = "MPPT2 status"]
28848    pub mppt2_status: u8,
28849    #[doc = "MPPT3 status"]
28850    pub mppt3_status: u8,
28851}
28852impl SENS_MPPT_DATA {
28853    pub const ENCODED_LEN: usize = 41usize;
28854    pub const DEFAULT: Self = Self {
28855        mppt_timestamp: 0_u64,
28856        mppt1_volt: 0.0_f32,
28857        mppt1_amp: 0.0_f32,
28858        mppt2_volt: 0.0_f32,
28859        mppt2_amp: 0.0_f32,
28860        mppt3_volt: 0.0_f32,
28861        mppt3_amp: 0.0_f32,
28862        mppt1_pwm: 0_u16,
28863        mppt2_pwm: 0_u16,
28864        mppt3_pwm: 0_u16,
28865        mppt1_status: 0_u8,
28866        mppt2_status: 0_u8,
28867        mppt3_status: 0_u8,
28868    };
28869    #[cfg(feature = "arbitrary")]
28870    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28871        use arbitrary::{Arbitrary, Unstructured};
28872        let mut buf = [0u8; 1024];
28873        rng.fill_bytes(&mut buf);
28874        let mut unstructured = Unstructured::new(&buf);
28875        Self::arbitrary(&mut unstructured).unwrap_or_default()
28876    }
28877}
28878impl Default for SENS_MPPT_DATA {
28879    fn default() -> Self {
28880        Self::DEFAULT.clone()
28881    }
28882}
28883impl MessageData for SENS_MPPT_DATA {
28884    type Message = MavMessage;
28885    const ID: u32 = 8003u32;
28886    const NAME: &'static str = "SENS_MPPT";
28887    const EXTRA_CRC: u8 = 231u8;
28888    const ENCODED_LEN: usize = 41usize;
28889    fn deser(
28890        _version: MavlinkVersion,
28891        __input: &[u8],
28892    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28893        let avail_len = __input.len();
28894        let mut payload_buf = [0; Self::ENCODED_LEN];
28895        let mut buf = if avail_len < Self::ENCODED_LEN {
28896            payload_buf[0..avail_len].copy_from_slice(__input);
28897            Bytes::new(&payload_buf)
28898        } else {
28899            Bytes::new(__input)
28900        };
28901        let mut __struct = Self::default();
28902        __struct.mppt_timestamp = buf.get_u64_le()?;
28903        __struct.mppt1_volt = buf.get_f32_le()?;
28904        __struct.mppt1_amp = buf.get_f32_le()?;
28905        __struct.mppt2_volt = buf.get_f32_le()?;
28906        __struct.mppt2_amp = buf.get_f32_le()?;
28907        __struct.mppt3_volt = buf.get_f32_le()?;
28908        __struct.mppt3_amp = buf.get_f32_le()?;
28909        __struct.mppt1_pwm = buf.get_u16_le()?;
28910        __struct.mppt2_pwm = buf.get_u16_le()?;
28911        __struct.mppt3_pwm = buf.get_u16_le()?;
28912        __struct.mppt1_status = buf.get_u8()?;
28913        __struct.mppt2_status = buf.get_u8()?;
28914        __struct.mppt3_status = buf.get_u8()?;
28915        Ok(__struct)
28916    }
28917    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28918        let mut __tmp = BytesMut::new(bytes);
28919        #[allow(clippy::absurd_extreme_comparisons)]
28920        #[allow(unused_comparisons)]
28921        if __tmp.remaining() < Self::ENCODED_LEN {
28922            panic!(
28923                "buffer is too small (need {} bytes, but got {})",
28924                Self::ENCODED_LEN,
28925                __tmp.remaining(),
28926            )
28927        }
28928        __tmp.put_u64_le(self.mppt_timestamp);
28929        __tmp.put_f32_le(self.mppt1_volt);
28930        __tmp.put_f32_le(self.mppt1_amp);
28931        __tmp.put_f32_le(self.mppt2_volt);
28932        __tmp.put_f32_le(self.mppt2_amp);
28933        __tmp.put_f32_le(self.mppt3_volt);
28934        __tmp.put_f32_le(self.mppt3_amp);
28935        __tmp.put_u16_le(self.mppt1_pwm);
28936        __tmp.put_u16_le(self.mppt2_pwm);
28937        __tmp.put_u16_le(self.mppt3_pwm);
28938        __tmp.put_u8(self.mppt1_status);
28939        __tmp.put_u8(self.mppt2_status);
28940        __tmp.put_u8(self.mppt3_status);
28941        if matches!(version, MavlinkVersion::V2) {
28942            let len = __tmp.len();
28943            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28944        } else {
28945            __tmp.len()
28946        }
28947    }
28948}
28949#[doc = "Voltage and current sensor data."]
28950#[doc = ""]
28951#[doc = "ID: 8002"]
28952#[derive(Debug, Clone, PartialEq)]
28953#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28954#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28955#[cfg_attr(feature = "ts", derive(TS))]
28956#[cfg_attr(feature = "ts", ts(export))]
28957pub struct SENS_POWER_DATA {
28958    #[doc = "Power board voltage sensor reading"]
28959    pub adc121_vspb_volt: f32,
28960    #[doc = "Power board current sensor reading"]
28961    pub adc121_cspb_amp: f32,
28962    #[doc = "Board current sensor 1 reading"]
28963    pub adc121_cs1_amp: f32,
28964    #[doc = "Board current sensor 2 reading"]
28965    pub adc121_cs2_amp: f32,
28966}
28967impl SENS_POWER_DATA {
28968    pub const ENCODED_LEN: usize = 16usize;
28969    pub const DEFAULT: Self = Self {
28970        adc121_vspb_volt: 0.0_f32,
28971        adc121_cspb_amp: 0.0_f32,
28972        adc121_cs1_amp: 0.0_f32,
28973        adc121_cs2_amp: 0.0_f32,
28974    };
28975    #[cfg(feature = "arbitrary")]
28976    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28977        use arbitrary::{Arbitrary, Unstructured};
28978        let mut buf = [0u8; 1024];
28979        rng.fill_bytes(&mut buf);
28980        let mut unstructured = Unstructured::new(&buf);
28981        Self::arbitrary(&mut unstructured).unwrap_or_default()
28982    }
28983}
28984impl Default for SENS_POWER_DATA {
28985    fn default() -> Self {
28986        Self::DEFAULT.clone()
28987    }
28988}
28989impl MessageData for SENS_POWER_DATA {
28990    type Message = MavMessage;
28991    const ID: u32 = 8002u32;
28992    const NAME: &'static str = "SENS_POWER";
28993    const EXTRA_CRC: u8 = 218u8;
28994    const ENCODED_LEN: usize = 16usize;
28995    fn deser(
28996        _version: MavlinkVersion,
28997        __input: &[u8],
28998    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28999        let avail_len = __input.len();
29000        let mut payload_buf = [0; Self::ENCODED_LEN];
29001        let mut buf = if avail_len < Self::ENCODED_LEN {
29002            payload_buf[0..avail_len].copy_from_slice(__input);
29003            Bytes::new(&payload_buf)
29004        } else {
29005            Bytes::new(__input)
29006        };
29007        let mut __struct = Self::default();
29008        __struct.adc121_vspb_volt = buf.get_f32_le()?;
29009        __struct.adc121_cspb_amp = buf.get_f32_le()?;
29010        __struct.adc121_cs1_amp = buf.get_f32_le()?;
29011        __struct.adc121_cs2_amp = buf.get_f32_le()?;
29012        Ok(__struct)
29013    }
29014    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29015        let mut __tmp = BytesMut::new(bytes);
29016        #[allow(clippy::absurd_extreme_comparisons)]
29017        #[allow(unused_comparisons)]
29018        if __tmp.remaining() < Self::ENCODED_LEN {
29019            panic!(
29020                "buffer is too small (need {} bytes, but got {})",
29021                Self::ENCODED_LEN,
29022                __tmp.remaining(),
29023            )
29024        }
29025        __tmp.put_f32_le(self.adc121_vspb_volt);
29026        __tmp.put_f32_le(self.adc121_cspb_amp);
29027        __tmp.put_f32_le(self.adc121_cs1_amp);
29028        __tmp.put_f32_le(self.adc121_cs2_amp);
29029        if matches!(version, MavlinkVersion::V2) {
29030            let len = __tmp.len();
29031            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29032        } else {
29033            __tmp.len()
29034        }
29035    }
29036}
29037#[doc = "Monitoring of power board status."]
29038#[doc = ""]
29039#[doc = "ID: 8013"]
29040#[derive(Debug, Clone, PartialEq)]
29041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29042#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29043#[cfg_attr(feature = "ts", derive(TS))]
29044#[cfg_attr(feature = "ts", ts(export))]
29045pub struct SENS_POWER_BOARD_DATA {
29046    #[doc = "Timestamp"]
29047    pub timestamp: u64,
29048    #[doc = "Power board system voltage"]
29049    pub pwr_brd_system_volt: f32,
29050    #[doc = "Power board servo voltage"]
29051    pub pwr_brd_servo_volt: f32,
29052    #[doc = "Power board digital voltage"]
29053    pub pwr_brd_digital_volt: f32,
29054    #[doc = "Power board left motor current sensor"]
29055    pub pwr_brd_mot_l_amp: f32,
29056    #[doc = "Power board right motor current sensor"]
29057    pub pwr_brd_mot_r_amp: f32,
29058    #[doc = "Power board analog current sensor"]
29059    pub pwr_brd_analog_amp: f32,
29060    #[doc = "Power board digital current sensor"]
29061    pub pwr_brd_digital_amp: f32,
29062    #[doc = "Power board extension current sensor"]
29063    pub pwr_brd_ext_amp: f32,
29064    #[doc = "Power board aux current sensor"]
29065    pub pwr_brd_aux_amp: f32,
29066    #[doc = "Power board status register"]
29067    pub pwr_brd_status: u8,
29068    #[doc = "Power board leds status"]
29069    pub pwr_brd_led_status: u8,
29070}
29071impl SENS_POWER_BOARD_DATA {
29072    pub const ENCODED_LEN: usize = 46usize;
29073    pub const DEFAULT: Self = Self {
29074        timestamp: 0_u64,
29075        pwr_brd_system_volt: 0.0_f32,
29076        pwr_brd_servo_volt: 0.0_f32,
29077        pwr_brd_digital_volt: 0.0_f32,
29078        pwr_brd_mot_l_amp: 0.0_f32,
29079        pwr_brd_mot_r_amp: 0.0_f32,
29080        pwr_brd_analog_amp: 0.0_f32,
29081        pwr_brd_digital_amp: 0.0_f32,
29082        pwr_brd_ext_amp: 0.0_f32,
29083        pwr_brd_aux_amp: 0.0_f32,
29084        pwr_brd_status: 0_u8,
29085        pwr_brd_led_status: 0_u8,
29086    };
29087    #[cfg(feature = "arbitrary")]
29088    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29089        use arbitrary::{Arbitrary, Unstructured};
29090        let mut buf = [0u8; 1024];
29091        rng.fill_bytes(&mut buf);
29092        let mut unstructured = Unstructured::new(&buf);
29093        Self::arbitrary(&mut unstructured).unwrap_or_default()
29094    }
29095}
29096impl Default for SENS_POWER_BOARD_DATA {
29097    fn default() -> Self {
29098        Self::DEFAULT.clone()
29099    }
29100}
29101impl MessageData for SENS_POWER_BOARD_DATA {
29102    type Message = MavMessage;
29103    const ID: u32 = 8013u32;
29104    const NAME: &'static str = "SENS_POWER_BOARD";
29105    const EXTRA_CRC: u8 = 222u8;
29106    const ENCODED_LEN: usize = 46usize;
29107    fn deser(
29108        _version: MavlinkVersion,
29109        __input: &[u8],
29110    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29111        let avail_len = __input.len();
29112        let mut payload_buf = [0; Self::ENCODED_LEN];
29113        let mut buf = if avail_len < Self::ENCODED_LEN {
29114            payload_buf[0..avail_len].copy_from_slice(__input);
29115            Bytes::new(&payload_buf)
29116        } else {
29117            Bytes::new(__input)
29118        };
29119        let mut __struct = Self::default();
29120        __struct.timestamp = buf.get_u64_le()?;
29121        __struct.pwr_brd_system_volt = buf.get_f32_le()?;
29122        __struct.pwr_brd_servo_volt = buf.get_f32_le()?;
29123        __struct.pwr_brd_digital_volt = buf.get_f32_le()?;
29124        __struct.pwr_brd_mot_l_amp = buf.get_f32_le()?;
29125        __struct.pwr_brd_mot_r_amp = buf.get_f32_le()?;
29126        __struct.pwr_brd_analog_amp = buf.get_f32_le()?;
29127        __struct.pwr_brd_digital_amp = buf.get_f32_le()?;
29128        __struct.pwr_brd_ext_amp = buf.get_f32_le()?;
29129        __struct.pwr_brd_aux_amp = buf.get_f32_le()?;
29130        __struct.pwr_brd_status = buf.get_u8()?;
29131        __struct.pwr_brd_led_status = buf.get_u8()?;
29132        Ok(__struct)
29133    }
29134    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29135        let mut __tmp = BytesMut::new(bytes);
29136        #[allow(clippy::absurd_extreme_comparisons)]
29137        #[allow(unused_comparisons)]
29138        if __tmp.remaining() < Self::ENCODED_LEN {
29139            panic!(
29140                "buffer is too small (need {} bytes, but got {})",
29141                Self::ENCODED_LEN,
29142                __tmp.remaining(),
29143            )
29144        }
29145        __tmp.put_u64_le(self.timestamp);
29146        __tmp.put_f32_le(self.pwr_brd_system_volt);
29147        __tmp.put_f32_le(self.pwr_brd_servo_volt);
29148        __tmp.put_f32_le(self.pwr_brd_digital_volt);
29149        __tmp.put_f32_le(self.pwr_brd_mot_l_amp);
29150        __tmp.put_f32_le(self.pwr_brd_mot_r_amp);
29151        __tmp.put_f32_le(self.pwr_brd_analog_amp);
29152        __tmp.put_f32_le(self.pwr_brd_digital_amp);
29153        __tmp.put_f32_le(self.pwr_brd_ext_amp);
29154        __tmp.put_f32_le(self.pwr_brd_aux_amp);
29155        __tmp.put_u8(self.pwr_brd_status);
29156        __tmp.put_u8(self.pwr_brd_led_status);
29157        if matches!(version, MavlinkVersion::V2) {
29158            let len = __tmp.len();
29159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29160        } else {
29161            __tmp.len()
29162        }
29163    }
29164}
29165#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
29166#[doc = ""]
29167#[doc = "ID: 126"]
29168#[derive(Debug, Clone, PartialEq)]
29169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29171#[cfg_attr(feature = "ts", derive(TS))]
29172#[cfg_attr(feature = "ts", ts(export))]
29173pub struct SERIAL_CONTROL_DATA {
29174    #[doc = "Baudrate of transfer. Zero means no change."]
29175    pub baudrate: u32,
29176    #[doc = "Timeout for reply data"]
29177    pub timeout: u16,
29178    #[doc = "Serial control device type."]
29179    pub device: SerialControlDev,
29180    #[doc = "Bitmap of serial control flags."]
29181    pub flags: SerialControlFlag,
29182    #[doc = "how many bytes in this transfer"]
29183    pub count: u8,
29184    #[doc = "serial data"]
29185    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29186    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29187    pub data: [u8; 70],
29188    #[doc = "System ID"]
29189    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29190    pub target_system: u8,
29191    #[doc = "Component ID"]
29192    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29193    pub target_component: u8,
29194}
29195impl SERIAL_CONTROL_DATA {
29196    pub const ENCODED_LEN: usize = 81usize;
29197    pub const DEFAULT: Self = Self {
29198        baudrate: 0_u32,
29199        timeout: 0_u16,
29200        device: SerialControlDev::DEFAULT,
29201        flags: SerialControlFlag::DEFAULT,
29202        count: 0_u8,
29203        data: [0_u8; 70usize],
29204        target_system: 0_u8,
29205        target_component: 0_u8,
29206    };
29207    #[cfg(feature = "arbitrary")]
29208    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29209        use arbitrary::{Arbitrary, Unstructured};
29210        let mut buf = [0u8; 1024];
29211        rng.fill_bytes(&mut buf);
29212        let mut unstructured = Unstructured::new(&buf);
29213        Self::arbitrary(&mut unstructured).unwrap_or_default()
29214    }
29215}
29216impl Default for SERIAL_CONTROL_DATA {
29217    fn default() -> Self {
29218        Self::DEFAULT.clone()
29219    }
29220}
29221impl MessageData for SERIAL_CONTROL_DATA {
29222    type Message = MavMessage;
29223    const ID: u32 = 126u32;
29224    const NAME: &'static str = "SERIAL_CONTROL";
29225    const EXTRA_CRC: u8 = 220u8;
29226    const ENCODED_LEN: usize = 81usize;
29227    fn deser(
29228        _version: MavlinkVersion,
29229        __input: &[u8],
29230    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29231        let avail_len = __input.len();
29232        let mut payload_buf = [0; Self::ENCODED_LEN];
29233        let mut buf = if avail_len < Self::ENCODED_LEN {
29234            payload_buf[0..avail_len].copy_from_slice(__input);
29235            Bytes::new(&payload_buf)
29236        } else {
29237            Bytes::new(__input)
29238        };
29239        let mut __struct = Self::default();
29240        __struct.baudrate = buf.get_u32_le()?;
29241        __struct.timeout = buf.get_u16_le()?;
29242        let tmp = buf.get_u8()?;
29243        __struct.device =
29244            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29245                enum_type: "SerialControlDev",
29246                value: tmp as u64,
29247            })?;
29248        let tmp = buf.get_u8()?;
29249        __struct.flags = SerialControlFlag::from_bits(tmp as <SerialControlFlag as Flags>::Bits)
29250            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29251                flag_type: "SerialControlFlag",
29252                value: tmp as u64,
29253            })?;
29254        __struct.count = buf.get_u8()?;
29255        for v in &mut __struct.data {
29256            let val = buf.get_u8()?;
29257            *v = val;
29258        }
29259        __struct.target_system = buf.get_u8()?;
29260        __struct.target_component = buf.get_u8()?;
29261        Ok(__struct)
29262    }
29263    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29264        let mut __tmp = BytesMut::new(bytes);
29265        #[allow(clippy::absurd_extreme_comparisons)]
29266        #[allow(unused_comparisons)]
29267        if __tmp.remaining() < Self::ENCODED_LEN {
29268            panic!(
29269                "buffer is too small (need {} bytes, but got {})",
29270                Self::ENCODED_LEN,
29271                __tmp.remaining(),
29272            )
29273        }
29274        __tmp.put_u32_le(self.baudrate);
29275        __tmp.put_u16_le(self.timeout);
29276        __tmp.put_u8(self.device as u8);
29277        __tmp.put_u8(self.flags.bits() as u8);
29278        __tmp.put_u8(self.count);
29279        for val in &self.data {
29280            __tmp.put_u8(*val);
29281        }
29282        if matches!(version, MavlinkVersion::V2) {
29283            __tmp.put_u8(self.target_system);
29284            __tmp.put_u8(self.target_component);
29285            let len = __tmp.len();
29286            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29287        } else {
29288            __tmp.len()
29289        }
29290    }
29291}
29292#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
29293#[doc = ""]
29294#[doc = "ID: 36"]
29295#[derive(Debug, Clone, PartialEq)]
29296#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29297#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29298#[cfg_attr(feature = "ts", derive(TS))]
29299#[cfg_attr(feature = "ts", ts(export))]
29300pub struct SERVO_OUTPUT_RAW_DATA {
29301    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29302    pub time_usec: u32,
29303    #[doc = "Servo output 1 value"]
29304    pub servo1_raw: u16,
29305    #[doc = "Servo output 2 value"]
29306    pub servo2_raw: u16,
29307    #[doc = "Servo output 3 value"]
29308    pub servo3_raw: u16,
29309    #[doc = "Servo output 4 value"]
29310    pub servo4_raw: u16,
29311    #[doc = "Servo output 5 value"]
29312    pub servo5_raw: u16,
29313    #[doc = "Servo output 6 value"]
29314    pub servo6_raw: u16,
29315    #[doc = "Servo output 7 value"]
29316    pub servo7_raw: u16,
29317    #[doc = "Servo output 8 value"]
29318    pub servo8_raw: u16,
29319    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
29320    pub port: u8,
29321    #[doc = "Servo output 9 value"]
29322    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29323    pub servo9_raw: u16,
29324    #[doc = "Servo output 10 value"]
29325    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29326    pub servo10_raw: u16,
29327    #[doc = "Servo output 11 value"]
29328    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29329    pub servo11_raw: u16,
29330    #[doc = "Servo output 12 value"]
29331    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29332    pub servo12_raw: u16,
29333    #[doc = "Servo output 13 value"]
29334    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29335    pub servo13_raw: u16,
29336    #[doc = "Servo output 14 value"]
29337    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29338    pub servo14_raw: u16,
29339    #[doc = "Servo output 15 value"]
29340    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29341    pub servo15_raw: u16,
29342    #[doc = "Servo output 16 value"]
29343    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29344    pub servo16_raw: u16,
29345}
29346impl SERVO_OUTPUT_RAW_DATA {
29347    pub const ENCODED_LEN: usize = 37usize;
29348    pub const DEFAULT: Self = Self {
29349        time_usec: 0_u32,
29350        servo1_raw: 0_u16,
29351        servo2_raw: 0_u16,
29352        servo3_raw: 0_u16,
29353        servo4_raw: 0_u16,
29354        servo5_raw: 0_u16,
29355        servo6_raw: 0_u16,
29356        servo7_raw: 0_u16,
29357        servo8_raw: 0_u16,
29358        port: 0_u8,
29359        servo9_raw: 0_u16,
29360        servo10_raw: 0_u16,
29361        servo11_raw: 0_u16,
29362        servo12_raw: 0_u16,
29363        servo13_raw: 0_u16,
29364        servo14_raw: 0_u16,
29365        servo15_raw: 0_u16,
29366        servo16_raw: 0_u16,
29367    };
29368    #[cfg(feature = "arbitrary")]
29369    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29370        use arbitrary::{Arbitrary, Unstructured};
29371        let mut buf = [0u8; 1024];
29372        rng.fill_bytes(&mut buf);
29373        let mut unstructured = Unstructured::new(&buf);
29374        Self::arbitrary(&mut unstructured).unwrap_or_default()
29375    }
29376}
29377impl Default for SERVO_OUTPUT_RAW_DATA {
29378    fn default() -> Self {
29379        Self::DEFAULT.clone()
29380    }
29381}
29382impl MessageData for SERVO_OUTPUT_RAW_DATA {
29383    type Message = MavMessage;
29384    const ID: u32 = 36u32;
29385    const NAME: &'static str = "SERVO_OUTPUT_RAW";
29386    const EXTRA_CRC: u8 = 222u8;
29387    const ENCODED_LEN: usize = 37usize;
29388    fn deser(
29389        _version: MavlinkVersion,
29390        __input: &[u8],
29391    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29392        let avail_len = __input.len();
29393        let mut payload_buf = [0; Self::ENCODED_LEN];
29394        let mut buf = if avail_len < Self::ENCODED_LEN {
29395            payload_buf[0..avail_len].copy_from_slice(__input);
29396            Bytes::new(&payload_buf)
29397        } else {
29398            Bytes::new(__input)
29399        };
29400        let mut __struct = Self::default();
29401        __struct.time_usec = buf.get_u32_le()?;
29402        __struct.servo1_raw = buf.get_u16_le()?;
29403        __struct.servo2_raw = buf.get_u16_le()?;
29404        __struct.servo3_raw = buf.get_u16_le()?;
29405        __struct.servo4_raw = buf.get_u16_le()?;
29406        __struct.servo5_raw = buf.get_u16_le()?;
29407        __struct.servo6_raw = buf.get_u16_le()?;
29408        __struct.servo7_raw = buf.get_u16_le()?;
29409        __struct.servo8_raw = buf.get_u16_le()?;
29410        __struct.port = buf.get_u8()?;
29411        __struct.servo9_raw = buf.get_u16_le()?;
29412        __struct.servo10_raw = buf.get_u16_le()?;
29413        __struct.servo11_raw = buf.get_u16_le()?;
29414        __struct.servo12_raw = buf.get_u16_le()?;
29415        __struct.servo13_raw = buf.get_u16_le()?;
29416        __struct.servo14_raw = buf.get_u16_le()?;
29417        __struct.servo15_raw = buf.get_u16_le()?;
29418        __struct.servo16_raw = buf.get_u16_le()?;
29419        Ok(__struct)
29420    }
29421    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29422        let mut __tmp = BytesMut::new(bytes);
29423        #[allow(clippy::absurd_extreme_comparisons)]
29424        #[allow(unused_comparisons)]
29425        if __tmp.remaining() < Self::ENCODED_LEN {
29426            panic!(
29427                "buffer is too small (need {} bytes, but got {})",
29428                Self::ENCODED_LEN,
29429                __tmp.remaining(),
29430            )
29431        }
29432        __tmp.put_u32_le(self.time_usec);
29433        __tmp.put_u16_le(self.servo1_raw);
29434        __tmp.put_u16_le(self.servo2_raw);
29435        __tmp.put_u16_le(self.servo3_raw);
29436        __tmp.put_u16_le(self.servo4_raw);
29437        __tmp.put_u16_le(self.servo5_raw);
29438        __tmp.put_u16_le(self.servo6_raw);
29439        __tmp.put_u16_le(self.servo7_raw);
29440        __tmp.put_u16_le(self.servo8_raw);
29441        __tmp.put_u8(self.port);
29442        if matches!(version, MavlinkVersion::V2) {
29443            __tmp.put_u16_le(self.servo9_raw);
29444            __tmp.put_u16_le(self.servo10_raw);
29445            __tmp.put_u16_le(self.servo11_raw);
29446            __tmp.put_u16_le(self.servo12_raw);
29447            __tmp.put_u16_le(self.servo13_raw);
29448            __tmp.put_u16_le(self.servo14_raw);
29449            __tmp.put_u16_le(self.servo15_raw);
29450            __tmp.put_u16_le(self.servo16_raw);
29451            let len = __tmp.len();
29452            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29453        } else {
29454            __tmp.len()
29455        }
29456    }
29457}
29458#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
29459#[doc = ""]
29460#[doc = "ID: 256"]
29461#[derive(Debug, Clone, PartialEq)]
29462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29464#[cfg_attr(feature = "ts", derive(TS))]
29465#[cfg_attr(feature = "ts", ts(export))]
29466pub struct SETUP_SIGNING_DATA {
29467    #[doc = "initial timestamp"]
29468    pub initial_timestamp: u64,
29469    #[doc = "system id of the target"]
29470    pub target_system: u8,
29471    #[doc = "component ID of the target"]
29472    pub target_component: u8,
29473    #[doc = "signing key"]
29474    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29475    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29476    pub secret_key: [u8; 32],
29477}
29478impl SETUP_SIGNING_DATA {
29479    pub const ENCODED_LEN: usize = 42usize;
29480    pub const DEFAULT: Self = Self {
29481        initial_timestamp: 0_u64,
29482        target_system: 0_u8,
29483        target_component: 0_u8,
29484        secret_key: [0_u8; 32usize],
29485    };
29486    #[cfg(feature = "arbitrary")]
29487    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29488        use arbitrary::{Arbitrary, Unstructured};
29489        let mut buf = [0u8; 1024];
29490        rng.fill_bytes(&mut buf);
29491        let mut unstructured = Unstructured::new(&buf);
29492        Self::arbitrary(&mut unstructured).unwrap_or_default()
29493    }
29494}
29495impl Default for SETUP_SIGNING_DATA {
29496    fn default() -> Self {
29497        Self::DEFAULT.clone()
29498    }
29499}
29500impl MessageData for SETUP_SIGNING_DATA {
29501    type Message = MavMessage;
29502    const ID: u32 = 256u32;
29503    const NAME: &'static str = "SETUP_SIGNING";
29504    const EXTRA_CRC: u8 = 71u8;
29505    const ENCODED_LEN: usize = 42usize;
29506    fn deser(
29507        _version: MavlinkVersion,
29508        __input: &[u8],
29509    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29510        let avail_len = __input.len();
29511        let mut payload_buf = [0; Self::ENCODED_LEN];
29512        let mut buf = if avail_len < Self::ENCODED_LEN {
29513            payload_buf[0..avail_len].copy_from_slice(__input);
29514            Bytes::new(&payload_buf)
29515        } else {
29516            Bytes::new(__input)
29517        };
29518        let mut __struct = Self::default();
29519        __struct.initial_timestamp = buf.get_u64_le()?;
29520        __struct.target_system = buf.get_u8()?;
29521        __struct.target_component = buf.get_u8()?;
29522        for v in &mut __struct.secret_key {
29523            let val = buf.get_u8()?;
29524            *v = val;
29525        }
29526        Ok(__struct)
29527    }
29528    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29529        let mut __tmp = BytesMut::new(bytes);
29530        #[allow(clippy::absurd_extreme_comparisons)]
29531        #[allow(unused_comparisons)]
29532        if __tmp.remaining() < Self::ENCODED_LEN {
29533            panic!(
29534                "buffer is too small (need {} bytes, but got {})",
29535                Self::ENCODED_LEN,
29536                __tmp.remaining(),
29537            )
29538        }
29539        __tmp.put_u64_le(self.initial_timestamp);
29540        __tmp.put_u8(self.target_system);
29541        __tmp.put_u8(self.target_component);
29542        for val in &self.secret_key {
29543            __tmp.put_u8(*val);
29544        }
29545        if matches!(version, MavlinkVersion::V2) {
29546            let len = __tmp.len();
29547            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29548        } else {
29549            __tmp.len()
29550        }
29551    }
29552}
29553#[doc = "Set the vehicle attitude and body angular rates."]
29554#[doc = ""]
29555#[doc = "ID: 139"]
29556#[derive(Debug, Clone, PartialEq)]
29557#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29558#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29559#[cfg_attr(feature = "ts", derive(TS))]
29560#[cfg_attr(feature = "ts", ts(export))]
29561pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
29562    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29563    pub time_usec: u64,
29564    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
29565    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29566    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29567    pub controls: [f32; 8],
29568    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
29569    pub group_mlx: u8,
29570    #[doc = "System ID"]
29571    pub target_system: u8,
29572    #[doc = "Component ID"]
29573    pub target_component: u8,
29574}
29575impl SET_ACTUATOR_CONTROL_TARGET_DATA {
29576    pub const ENCODED_LEN: usize = 43usize;
29577    pub const DEFAULT: Self = Self {
29578        time_usec: 0_u64,
29579        controls: [0.0_f32; 8usize],
29580        group_mlx: 0_u8,
29581        target_system: 0_u8,
29582        target_component: 0_u8,
29583    };
29584    #[cfg(feature = "arbitrary")]
29585    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29586        use arbitrary::{Arbitrary, Unstructured};
29587        let mut buf = [0u8; 1024];
29588        rng.fill_bytes(&mut buf);
29589        let mut unstructured = Unstructured::new(&buf);
29590        Self::arbitrary(&mut unstructured).unwrap_or_default()
29591    }
29592}
29593impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
29594    fn default() -> Self {
29595        Self::DEFAULT.clone()
29596    }
29597}
29598impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
29599    type Message = MavMessage;
29600    const ID: u32 = 139u32;
29601    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
29602    const EXTRA_CRC: u8 = 168u8;
29603    const ENCODED_LEN: usize = 43usize;
29604    fn deser(
29605        _version: MavlinkVersion,
29606        __input: &[u8],
29607    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29608        let avail_len = __input.len();
29609        let mut payload_buf = [0; Self::ENCODED_LEN];
29610        let mut buf = if avail_len < Self::ENCODED_LEN {
29611            payload_buf[0..avail_len].copy_from_slice(__input);
29612            Bytes::new(&payload_buf)
29613        } else {
29614            Bytes::new(__input)
29615        };
29616        let mut __struct = Self::default();
29617        __struct.time_usec = buf.get_u64_le()?;
29618        for v in &mut __struct.controls {
29619            let val = buf.get_f32_le()?;
29620            *v = val;
29621        }
29622        __struct.group_mlx = buf.get_u8()?;
29623        __struct.target_system = buf.get_u8()?;
29624        __struct.target_component = buf.get_u8()?;
29625        Ok(__struct)
29626    }
29627    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29628        let mut __tmp = BytesMut::new(bytes);
29629        #[allow(clippy::absurd_extreme_comparisons)]
29630        #[allow(unused_comparisons)]
29631        if __tmp.remaining() < Self::ENCODED_LEN {
29632            panic!(
29633                "buffer is too small (need {} bytes, but got {})",
29634                Self::ENCODED_LEN,
29635                __tmp.remaining(),
29636            )
29637        }
29638        __tmp.put_u64_le(self.time_usec);
29639        for val in &self.controls {
29640            __tmp.put_f32_le(*val);
29641        }
29642        __tmp.put_u8(self.group_mlx);
29643        __tmp.put_u8(self.target_system);
29644        __tmp.put_u8(self.target_component);
29645        if matches!(version, MavlinkVersion::V2) {
29646            let len = __tmp.len();
29647            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29648        } else {
29649            __tmp.len()
29650        }
29651    }
29652}
29653#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
29654#[doc = ""]
29655#[doc = "ID: 82"]
29656#[derive(Debug, Clone, PartialEq)]
29657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29658#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29659#[cfg_attr(feature = "ts", derive(TS))]
29660#[cfg_attr(feature = "ts", ts(export))]
29661pub struct SET_ATTITUDE_TARGET_DATA {
29662    #[doc = "Timestamp (time since system boot)."]
29663    pub time_boot_ms: u32,
29664    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
29665    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29666    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29667    pub q: [f32; 4],
29668    #[doc = "Body roll rate"]
29669    pub body_roll_rate: f32,
29670    #[doc = "Body pitch rate"]
29671    pub body_pitch_rate: f32,
29672    #[doc = "Body yaw rate"]
29673    pub body_yaw_rate: f32,
29674    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
29675    pub thrust: f32,
29676    #[doc = "System ID"]
29677    pub target_system: u8,
29678    #[doc = "Component ID"]
29679    pub target_component: u8,
29680    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29681    pub type_mask: AttitudeTargetTypemask,
29682    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
29683    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29684    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29685    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29686    pub thrust_body: [f32; 3],
29687}
29688impl SET_ATTITUDE_TARGET_DATA {
29689    pub const ENCODED_LEN: usize = 51usize;
29690    pub const DEFAULT: Self = Self {
29691        time_boot_ms: 0_u32,
29692        q: [0.0_f32; 4usize],
29693        body_roll_rate: 0.0_f32,
29694        body_pitch_rate: 0.0_f32,
29695        body_yaw_rate: 0.0_f32,
29696        thrust: 0.0_f32,
29697        target_system: 0_u8,
29698        target_component: 0_u8,
29699        type_mask: AttitudeTargetTypemask::DEFAULT,
29700        thrust_body: [0.0_f32; 3usize],
29701    };
29702    #[cfg(feature = "arbitrary")]
29703    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29704        use arbitrary::{Arbitrary, Unstructured};
29705        let mut buf = [0u8; 1024];
29706        rng.fill_bytes(&mut buf);
29707        let mut unstructured = Unstructured::new(&buf);
29708        Self::arbitrary(&mut unstructured).unwrap_or_default()
29709    }
29710}
29711impl Default for SET_ATTITUDE_TARGET_DATA {
29712    fn default() -> Self {
29713        Self::DEFAULT.clone()
29714    }
29715}
29716impl MessageData for SET_ATTITUDE_TARGET_DATA {
29717    type Message = MavMessage;
29718    const ID: u32 = 82u32;
29719    const NAME: &'static str = "SET_ATTITUDE_TARGET";
29720    const EXTRA_CRC: u8 = 49u8;
29721    const ENCODED_LEN: usize = 51usize;
29722    fn deser(
29723        _version: MavlinkVersion,
29724        __input: &[u8],
29725    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29726        let avail_len = __input.len();
29727        let mut payload_buf = [0; Self::ENCODED_LEN];
29728        let mut buf = if avail_len < Self::ENCODED_LEN {
29729            payload_buf[0..avail_len].copy_from_slice(__input);
29730            Bytes::new(&payload_buf)
29731        } else {
29732            Bytes::new(__input)
29733        };
29734        let mut __struct = Self::default();
29735        __struct.time_boot_ms = buf.get_u32_le()?;
29736        for v in &mut __struct.q {
29737            let val = buf.get_f32_le()?;
29738            *v = val;
29739        }
29740        __struct.body_roll_rate = buf.get_f32_le()?;
29741        __struct.body_pitch_rate = buf.get_f32_le()?;
29742        __struct.body_yaw_rate = buf.get_f32_le()?;
29743        __struct.thrust = buf.get_f32_le()?;
29744        __struct.target_system = buf.get_u8()?;
29745        __struct.target_component = buf.get_u8()?;
29746        let tmp = buf.get_u8()?;
29747        __struct.type_mask =
29748            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
29749                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29750                    flag_type: "AttitudeTargetTypemask",
29751                    value: tmp as u64,
29752                })?;
29753        for v in &mut __struct.thrust_body {
29754            let val = buf.get_f32_le()?;
29755            *v = val;
29756        }
29757        Ok(__struct)
29758    }
29759    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29760        let mut __tmp = BytesMut::new(bytes);
29761        #[allow(clippy::absurd_extreme_comparisons)]
29762        #[allow(unused_comparisons)]
29763        if __tmp.remaining() < Self::ENCODED_LEN {
29764            panic!(
29765                "buffer is too small (need {} bytes, but got {})",
29766                Self::ENCODED_LEN,
29767                __tmp.remaining(),
29768            )
29769        }
29770        __tmp.put_u32_le(self.time_boot_ms);
29771        for val in &self.q {
29772            __tmp.put_f32_le(*val);
29773        }
29774        __tmp.put_f32_le(self.body_roll_rate);
29775        __tmp.put_f32_le(self.body_pitch_rate);
29776        __tmp.put_f32_le(self.body_yaw_rate);
29777        __tmp.put_f32_le(self.thrust);
29778        __tmp.put_u8(self.target_system);
29779        __tmp.put_u8(self.target_component);
29780        __tmp.put_u8(self.type_mask.bits() as u8);
29781        if matches!(version, MavlinkVersion::V2) {
29782            for val in &self.thrust_body {
29783                __tmp.put_f32_le(*val);
29784            }
29785            let len = __tmp.len();
29786            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29787        } else {
29788            __tmp.len()
29789        }
29790    }
29791}
29792#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
29793#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
29794#[doc = ""]
29795#[doc = "ID: 48"]
29796#[derive(Debug, Clone, PartialEq)]
29797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29798#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29799#[cfg_attr(feature = "ts", derive(TS))]
29800#[cfg_attr(feature = "ts", ts(export))]
29801pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
29802    #[doc = "Latitude (WGS84)"]
29803    pub latitude: i32,
29804    #[doc = "Longitude (WGS84)"]
29805    pub longitude: i32,
29806    #[doc = "Altitude (MSL). Positive for up."]
29807    pub altitude: i32,
29808    #[doc = "System ID"]
29809    pub target_system: u8,
29810    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29811    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29812    pub time_usec: u64,
29813}
29814impl SET_GPS_GLOBAL_ORIGIN_DATA {
29815    pub const ENCODED_LEN: usize = 21usize;
29816    pub const DEFAULT: Self = Self {
29817        latitude: 0_i32,
29818        longitude: 0_i32,
29819        altitude: 0_i32,
29820        target_system: 0_u8,
29821        time_usec: 0_u64,
29822    };
29823    #[cfg(feature = "arbitrary")]
29824    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29825        use arbitrary::{Arbitrary, Unstructured};
29826        let mut buf = [0u8; 1024];
29827        rng.fill_bytes(&mut buf);
29828        let mut unstructured = Unstructured::new(&buf);
29829        Self::arbitrary(&mut unstructured).unwrap_or_default()
29830    }
29831}
29832impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
29833    fn default() -> Self {
29834        Self::DEFAULT.clone()
29835    }
29836}
29837impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
29838    type Message = MavMessage;
29839    const ID: u32 = 48u32;
29840    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
29841    const EXTRA_CRC: u8 = 41u8;
29842    const ENCODED_LEN: usize = 21usize;
29843    fn deser(
29844        _version: MavlinkVersion,
29845        __input: &[u8],
29846    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29847        let avail_len = __input.len();
29848        let mut payload_buf = [0; Self::ENCODED_LEN];
29849        let mut buf = if avail_len < Self::ENCODED_LEN {
29850            payload_buf[0..avail_len].copy_from_slice(__input);
29851            Bytes::new(&payload_buf)
29852        } else {
29853            Bytes::new(__input)
29854        };
29855        let mut __struct = Self::default();
29856        __struct.latitude = buf.get_i32_le()?;
29857        __struct.longitude = buf.get_i32_le()?;
29858        __struct.altitude = buf.get_i32_le()?;
29859        __struct.target_system = buf.get_u8()?;
29860        __struct.time_usec = buf.get_u64_le()?;
29861        Ok(__struct)
29862    }
29863    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29864        let mut __tmp = BytesMut::new(bytes);
29865        #[allow(clippy::absurd_extreme_comparisons)]
29866        #[allow(unused_comparisons)]
29867        if __tmp.remaining() < Self::ENCODED_LEN {
29868            panic!(
29869                "buffer is too small (need {} bytes, but got {})",
29870                Self::ENCODED_LEN,
29871                __tmp.remaining(),
29872            )
29873        }
29874        __tmp.put_i32_le(self.latitude);
29875        __tmp.put_i32_le(self.longitude);
29876        __tmp.put_i32_le(self.altitude);
29877        __tmp.put_u8(self.target_system);
29878        if matches!(version, MavlinkVersion::V2) {
29879            __tmp.put_u64_le(self.time_usec);
29880            let len = __tmp.len();
29881            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29882        } else {
29883            __tmp.len()
29884        }
29885    }
29886}
29887#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
29888#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
29889#[doc = ""]
29890#[doc = "ID: 243"]
29891#[derive(Debug, Clone, PartialEq)]
29892#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29893#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29894#[cfg_attr(feature = "ts", derive(TS))]
29895#[cfg_attr(feature = "ts", ts(export))]
29896pub struct SET_HOME_POSITION_DATA {
29897    #[doc = "Latitude (WGS84)"]
29898    pub latitude: i32,
29899    #[doc = "Longitude (WGS84)"]
29900    pub longitude: i32,
29901    #[doc = "Altitude (MSL). Positive for up."]
29902    pub altitude: i32,
29903    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
29904    pub x: f32,
29905    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
29906    pub y: f32,
29907    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
29908    pub z: f32,
29909    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
29910    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29911    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29912    pub q: [f32; 4],
29913    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29914    pub approach_x: f32,
29915    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29916    pub approach_y: f32,
29917    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29918    pub approach_z: f32,
29919    #[doc = "System ID."]
29920    pub target_system: u8,
29921    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29922    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29923    pub time_usec: u64,
29924}
29925impl SET_HOME_POSITION_DATA {
29926    pub const ENCODED_LEN: usize = 61usize;
29927    pub const DEFAULT: Self = Self {
29928        latitude: 0_i32,
29929        longitude: 0_i32,
29930        altitude: 0_i32,
29931        x: 0.0_f32,
29932        y: 0.0_f32,
29933        z: 0.0_f32,
29934        q: [0.0_f32; 4usize],
29935        approach_x: 0.0_f32,
29936        approach_y: 0.0_f32,
29937        approach_z: 0.0_f32,
29938        target_system: 0_u8,
29939        time_usec: 0_u64,
29940    };
29941    #[cfg(feature = "arbitrary")]
29942    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29943        use arbitrary::{Arbitrary, Unstructured};
29944        let mut buf = [0u8; 1024];
29945        rng.fill_bytes(&mut buf);
29946        let mut unstructured = Unstructured::new(&buf);
29947        Self::arbitrary(&mut unstructured).unwrap_or_default()
29948    }
29949}
29950impl Default for SET_HOME_POSITION_DATA {
29951    fn default() -> Self {
29952        Self::DEFAULT.clone()
29953    }
29954}
29955impl MessageData for SET_HOME_POSITION_DATA {
29956    type Message = MavMessage;
29957    const ID: u32 = 243u32;
29958    const NAME: &'static str = "SET_HOME_POSITION";
29959    const EXTRA_CRC: u8 = 85u8;
29960    const ENCODED_LEN: usize = 61usize;
29961    fn deser(
29962        _version: MavlinkVersion,
29963        __input: &[u8],
29964    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29965        let avail_len = __input.len();
29966        let mut payload_buf = [0; Self::ENCODED_LEN];
29967        let mut buf = if avail_len < Self::ENCODED_LEN {
29968            payload_buf[0..avail_len].copy_from_slice(__input);
29969            Bytes::new(&payload_buf)
29970        } else {
29971            Bytes::new(__input)
29972        };
29973        let mut __struct = Self::default();
29974        __struct.latitude = buf.get_i32_le()?;
29975        __struct.longitude = buf.get_i32_le()?;
29976        __struct.altitude = buf.get_i32_le()?;
29977        __struct.x = buf.get_f32_le()?;
29978        __struct.y = buf.get_f32_le()?;
29979        __struct.z = buf.get_f32_le()?;
29980        for v in &mut __struct.q {
29981            let val = buf.get_f32_le()?;
29982            *v = val;
29983        }
29984        __struct.approach_x = buf.get_f32_le()?;
29985        __struct.approach_y = buf.get_f32_le()?;
29986        __struct.approach_z = buf.get_f32_le()?;
29987        __struct.target_system = buf.get_u8()?;
29988        __struct.time_usec = buf.get_u64_le()?;
29989        Ok(__struct)
29990    }
29991    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29992        let mut __tmp = BytesMut::new(bytes);
29993        #[allow(clippy::absurd_extreme_comparisons)]
29994        #[allow(unused_comparisons)]
29995        if __tmp.remaining() < Self::ENCODED_LEN {
29996            panic!(
29997                "buffer is too small (need {} bytes, but got {})",
29998                Self::ENCODED_LEN,
29999                __tmp.remaining(),
30000            )
30001        }
30002        __tmp.put_i32_le(self.latitude);
30003        __tmp.put_i32_le(self.longitude);
30004        __tmp.put_i32_le(self.altitude);
30005        __tmp.put_f32_le(self.x);
30006        __tmp.put_f32_le(self.y);
30007        __tmp.put_f32_le(self.z);
30008        for val in &self.q {
30009            __tmp.put_f32_le(*val);
30010        }
30011        __tmp.put_f32_le(self.approach_x);
30012        __tmp.put_f32_le(self.approach_y);
30013        __tmp.put_f32_le(self.approach_z);
30014        __tmp.put_u8(self.target_system);
30015        if matches!(version, MavlinkVersion::V2) {
30016            __tmp.put_u64_le(self.time_usec);
30017            let len = __tmp.len();
30018            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30019        } else {
30020            __tmp.len()
30021        }
30022    }
30023}
30024#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
30025#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
30026#[doc = ""]
30027#[doc = "ID: 11"]
30028#[derive(Debug, Clone, PartialEq)]
30029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30030#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30031#[cfg_attr(feature = "ts", derive(TS))]
30032#[cfg_attr(feature = "ts", ts(export))]
30033pub struct SET_MODE_DATA {
30034    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
30035    pub custom_mode: u32,
30036    #[doc = "The system setting the mode"]
30037    pub target_system: u8,
30038    #[doc = "The new base mode."]
30039    pub base_mode: MavMode,
30040}
30041impl SET_MODE_DATA {
30042    pub const ENCODED_LEN: usize = 6usize;
30043    pub const DEFAULT: Self = Self {
30044        custom_mode: 0_u32,
30045        target_system: 0_u8,
30046        base_mode: MavMode::DEFAULT,
30047    };
30048    #[cfg(feature = "arbitrary")]
30049    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30050        use arbitrary::{Arbitrary, Unstructured};
30051        let mut buf = [0u8; 1024];
30052        rng.fill_bytes(&mut buf);
30053        let mut unstructured = Unstructured::new(&buf);
30054        Self::arbitrary(&mut unstructured).unwrap_or_default()
30055    }
30056}
30057impl Default for SET_MODE_DATA {
30058    fn default() -> Self {
30059        Self::DEFAULT.clone()
30060    }
30061}
30062impl MessageData for SET_MODE_DATA {
30063    type Message = MavMessage;
30064    const ID: u32 = 11u32;
30065    const NAME: &'static str = "SET_MODE";
30066    const EXTRA_CRC: u8 = 89u8;
30067    const ENCODED_LEN: usize = 6usize;
30068    fn deser(
30069        _version: MavlinkVersion,
30070        __input: &[u8],
30071    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30072        let avail_len = __input.len();
30073        let mut payload_buf = [0; Self::ENCODED_LEN];
30074        let mut buf = if avail_len < Self::ENCODED_LEN {
30075            payload_buf[0..avail_len].copy_from_slice(__input);
30076            Bytes::new(&payload_buf)
30077        } else {
30078            Bytes::new(__input)
30079        };
30080        let mut __struct = Self::default();
30081        __struct.custom_mode = buf.get_u32_le()?;
30082        __struct.target_system = buf.get_u8()?;
30083        let tmp = buf.get_u8()?;
30084        __struct.base_mode =
30085            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30086                enum_type: "MavMode",
30087                value: tmp as u64,
30088            })?;
30089        Ok(__struct)
30090    }
30091    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30092        let mut __tmp = BytesMut::new(bytes);
30093        #[allow(clippy::absurd_extreme_comparisons)]
30094        #[allow(unused_comparisons)]
30095        if __tmp.remaining() < Self::ENCODED_LEN {
30096            panic!(
30097                "buffer is too small (need {} bytes, but got {})",
30098                Self::ENCODED_LEN,
30099                __tmp.remaining(),
30100            )
30101        }
30102        __tmp.put_u32_le(self.custom_mode);
30103        __tmp.put_u8(self.target_system);
30104        __tmp.put_u8(self.base_mode as u8);
30105        if matches!(version, MavlinkVersion::V2) {
30106            let len = __tmp.len();
30107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30108        } else {
30109            __tmp.len()
30110        }
30111    }
30112}
30113#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
30114#[doc = ""]
30115#[doc = "ID: 86"]
30116#[derive(Debug, Clone, PartialEq)]
30117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30119#[cfg_attr(feature = "ts", derive(TS))]
30120#[cfg_attr(feature = "ts", ts(export))]
30121pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
30122    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
30123    pub time_boot_ms: u32,
30124    #[doc = "Latitude in WGS84 frame"]
30125    pub lat_int: i32,
30126    #[doc = "Longitude in WGS84 frame"]
30127    pub lon_int: i32,
30128    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
30129    pub alt: f32,
30130    #[doc = "X velocity in NED frame"]
30131    pub vx: f32,
30132    #[doc = "Y velocity in NED frame"]
30133    pub vy: f32,
30134    #[doc = "Z velocity in NED frame"]
30135    pub vz: f32,
30136    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30137    pub afx: f32,
30138    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30139    pub afy: f32,
30140    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30141    pub afz: f32,
30142    #[doc = "yaw setpoint"]
30143    pub yaw: f32,
30144    #[doc = "yaw rate setpoint"]
30145    pub yaw_rate: f32,
30146    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30147    pub type_mask: PositionTargetTypemask,
30148    #[doc = "System ID"]
30149    pub target_system: u8,
30150    #[doc = "Component ID"]
30151    pub target_component: u8,
30152    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
30153    pub coordinate_frame: MavFrame,
30154}
30155impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
30156    pub const ENCODED_LEN: usize = 53usize;
30157    pub const DEFAULT: Self = Self {
30158        time_boot_ms: 0_u32,
30159        lat_int: 0_i32,
30160        lon_int: 0_i32,
30161        alt: 0.0_f32,
30162        vx: 0.0_f32,
30163        vy: 0.0_f32,
30164        vz: 0.0_f32,
30165        afx: 0.0_f32,
30166        afy: 0.0_f32,
30167        afz: 0.0_f32,
30168        yaw: 0.0_f32,
30169        yaw_rate: 0.0_f32,
30170        type_mask: PositionTargetTypemask::DEFAULT,
30171        target_system: 0_u8,
30172        target_component: 0_u8,
30173        coordinate_frame: MavFrame::DEFAULT,
30174    };
30175    #[cfg(feature = "arbitrary")]
30176    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30177        use arbitrary::{Arbitrary, Unstructured};
30178        let mut buf = [0u8; 1024];
30179        rng.fill_bytes(&mut buf);
30180        let mut unstructured = Unstructured::new(&buf);
30181        Self::arbitrary(&mut unstructured).unwrap_or_default()
30182    }
30183}
30184impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30185    fn default() -> Self {
30186        Self::DEFAULT.clone()
30187    }
30188}
30189impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30190    type Message = MavMessage;
30191    const ID: u32 = 86u32;
30192    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
30193    const EXTRA_CRC: u8 = 5u8;
30194    const ENCODED_LEN: usize = 53usize;
30195    fn deser(
30196        _version: MavlinkVersion,
30197        __input: &[u8],
30198    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30199        let avail_len = __input.len();
30200        let mut payload_buf = [0; Self::ENCODED_LEN];
30201        let mut buf = if avail_len < Self::ENCODED_LEN {
30202            payload_buf[0..avail_len].copy_from_slice(__input);
30203            Bytes::new(&payload_buf)
30204        } else {
30205            Bytes::new(__input)
30206        };
30207        let mut __struct = Self::default();
30208        __struct.time_boot_ms = buf.get_u32_le()?;
30209        __struct.lat_int = buf.get_i32_le()?;
30210        __struct.lon_int = buf.get_i32_le()?;
30211        __struct.alt = buf.get_f32_le()?;
30212        __struct.vx = buf.get_f32_le()?;
30213        __struct.vy = buf.get_f32_le()?;
30214        __struct.vz = buf.get_f32_le()?;
30215        __struct.afx = buf.get_f32_le()?;
30216        __struct.afy = buf.get_f32_le()?;
30217        __struct.afz = buf.get_f32_le()?;
30218        __struct.yaw = buf.get_f32_le()?;
30219        __struct.yaw_rate = buf.get_f32_le()?;
30220        let tmp = buf.get_u16_le()?;
30221        __struct.type_mask =
30222            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
30223                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30224                    flag_type: "PositionTargetTypemask",
30225                    value: tmp as u64,
30226                })?;
30227        __struct.target_system = buf.get_u8()?;
30228        __struct.target_component = buf.get_u8()?;
30229        let tmp = buf.get_u8()?;
30230        __struct.coordinate_frame =
30231            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30232                enum_type: "MavFrame",
30233                value: tmp as u64,
30234            })?;
30235        Ok(__struct)
30236    }
30237    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30238        let mut __tmp = BytesMut::new(bytes);
30239        #[allow(clippy::absurd_extreme_comparisons)]
30240        #[allow(unused_comparisons)]
30241        if __tmp.remaining() < Self::ENCODED_LEN {
30242            panic!(
30243                "buffer is too small (need {} bytes, but got {})",
30244                Self::ENCODED_LEN,
30245                __tmp.remaining(),
30246            )
30247        }
30248        __tmp.put_u32_le(self.time_boot_ms);
30249        __tmp.put_i32_le(self.lat_int);
30250        __tmp.put_i32_le(self.lon_int);
30251        __tmp.put_f32_le(self.alt);
30252        __tmp.put_f32_le(self.vx);
30253        __tmp.put_f32_le(self.vy);
30254        __tmp.put_f32_le(self.vz);
30255        __tmp.put_f32_le(self.afx);
30256        __tmp.put_f32_le(self.afy);
30257        __tmp.put_f32_le(self.afz);
30258        __tmp.put_f32_le(self.yaw);
30259        __tmp.put_f32_le(self.yaw_rate);
30260        __tmp.put_u16_le(self.type_mask.bits() as u16);
30261        __tmp.put_u8(self.target_system);
30262        __tmp.put_u8(self.target_component);
30263        __tmp.put_u8(self.coordinate_frame as u8);
30264        if matches!(version, MavlinkVersion::V2) {
30265            let len = __tmp.len();
30266            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30267        } else {
30268            __tmp.len()
30269        }
30270    }
30271}
30272#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
30273#[doc = ""]
30274#[doc = "ID: 84"]
30275#[derive(Debug, Clone, PartialEq)]
30276#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30277#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30278#[cfg_attr(feature = "ts", derive(TS))]
30279#[cfg_attr(feature = "ts", ts(export))]
30280pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
30281    #[doc = "Timestamp (time since system boot)."]
30282    pub time_boot_ms: u32,
30283    #[doc = "X Position in NED frame"]
30284    pub x: f32,
30285    #[doc = "Y Position in NED frame"]
30286    pub y: f32,
30287    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
30288    pub z: f32,
30289    #[doc = "X velocity in NED frame"]
30290    pub vx: f32,
30291    #[doc = "Y velocity in NED frame"]
30292    pub vy: f32,
30293    #[doc = "Z velocity in NED frame"]
30294    pub vz: f32,
30295    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30296    pub afx: f32,
30297    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30298    pub afy: f32,
30299    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30300    pub afz: f32,
30301    #[doc = "yaw setpoint"]
30302    pub yaw: f32,
30303    #[doc = "yaw rate setpoint"]
30304    pub yaw_rate: f32,
30305    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30306    pub type_mask: PositionTargetTypemask,
30307    #[doc = "System ID"]
30308    pub target_system: u8,
30309    #[doc = "Component ID"]
30310    pub target_component: u8,
30311    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
30312    pub coordinate_frame: MavFrame,
30313}
30314impl SET_POSITION_TARGET_LOCAL_NED_DATA {
30315    pub const ENCODED_LEN: usize = 53usize;
30316    pub const DEFAULT: Self = Self {
30317        time_boot_ms: 0_u32,
30318        x: 0.0_f32,
30319        y: 0.0_f32,
30320        z: 0.0_f32,
30321        vx: 0.0_f32,
30322        vy: 0.0_f32,
30323        vz: 0.0_f32,
30324        afx: 0.0_f32,
30325        afy: 0.0_f32,
30326        afz: 0.0_f32,
30327        yaw: 0.0_f32,
30328        yaw_rate: 0.0_f32,
30329        type_mask: PositionTargetTypemask::DEFAULT,
30330        target_system: 0_u8,
30331        target_component: 0_u8,
30332        coordinate_frame: MavFrame::DEFAULT,
30333    };
30334    #[cfg(feature = "arbitrary")]
30335    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30336        use arbitrary::{Arbitrary, Unstructured};
30337        let mut buf = [0u8; 1024];
30338        rng.fill_bytes(&mut buf);
30339        let mut unstructured = Unstructured::new(&buf);
30340        Self::arbitrary(&mut unstructured).unwrap_or_default()
30341    }
30342}
30343impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
30344    fn default() -> Self {
30345        Self::DEFAULT.clone()
30346    }
30347}
30348impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
30349    type Message = MavMessage;
30350    const ID: u32 = 84u32;
30351    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
30352    const EXTRA_CRC: u8 = 143u8;
30353    const ENCODED_LEN: usize = 53usize;
30354    fn deser(
30355        _version: MavlinkVersion,
30356        __input: &[u8],
30357    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30358        let avail_len = __input.len();
30359        let mut payload_buf = [0; Self::ENCODED_LEN];
30360        let mut buf = if avail_len < Self::ENCODED_LEN {
30361            payload_buf[0..avail_len].copy_from_slice(__input);
30362            Bytes::new(&payload_buf)
30363        } else {
30364            Bytes::new(__input)
30365        };
30366        let mut __struct = Self::default();
30367        __struct.time_boot_ms = buf.get_u32_le()?;
30368        __struct.x = buf.get_f32_le()?;
30369        __struct.y = buf.get_f32_le()?;
30370        __struct.z = buf.get_f32_le()?;
30371        __struct.vx = buf.get_f32_le()?;
30372        __struct.vy = buf.get_f32_le()?;
30373        __struct.vz = buf.get_f32_le()?;
30374        __struct.afx = buf.get_f32_le()?;
30375        __struct.afy = buf.get_f32_le()?;
30376        __struct.afz = buf.get_f32_le()?;
30377        __struct.yaw = buf.get_f32_le()?;
30378        __struct.yaw_rate = buf.get_f32_le()?;
30379        let tmp = buf.get_u16_le()?;
30380        __struct.type_mask =
30381            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
30382                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30383                    flag_type: "PositionTargetTypemask",
30384                    value: tmp as u64,
30385                })?;
30386        __struct.target_system = buf.get_u8()?;
30387        __struct.target_component = buf.get_u8()?;
30388        let tmp = buf.get_u8()?;
30389        __struct.coordinate_frame =
30390            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30391                enum_type: "MavFrame",
30392                value: tmp as u64,
30393            })?;
30394        Ok(__struct)
30395    }
30396    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30397        let mut __tmp = BytesMut::new(bytes);
30398        #[allow(clippy::absurd_extreme_comparisons)]
30399        #[allow(unused_comparisons)]
30400        if __tmp.remaining() < Self::ENCODED_LEN {
30401            panic!(
30402                "buffer is too small (need {} bytes, but got {})",
30403                Self::ENCODED_LEN,
30404                __tmp.remaining(),
30405            )
30406        }
30407        __tmp.put_u32_le(self.time_boot_ms);
30408        __tmp.put_f32_le(self.x);
30409        __tmp.put_f32_le(self.y);
30410        __tmp.put_f32_le(self.z);
30411        __tmp.put_f32_le(self.vx);
30412        __tmp.put_f32_le(self.vy);
30413        __tmp.put_f32_le(self.vz);
30414        __tmp.put_f32_le(self.afx);
30415        __tmp.put_f32_le(self.afy);
30416        __tmp.put_f32_le(self.afz);
30417        __tmp.put_f32_le(self.yaw);
30418        __tmp.put_f32_le(self.yaw_rate);
30419        __tmp.put_u16_le(self.type_mask.bits() as u16);
30420        __tmp.put_u8(self.target_system);
30421        __tmp.put_u8(self.target_component);
30422        __tmp.put_u8(self.coordinate_frame as u8);
30423        if matches!(version, MavlinkVersion::V2) {
30424            let len = __tmp.len();
30425            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30426        } else {
30427            __tmp.len()
30428        }
30429    }
30430}
30431#[doc = "Status of simulation environment, if used."]
30432#[doc = ""]
30433#[doc = "ID: 108"]
30434#[derive(Debug, Clone, PartialEq)]
30435#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30436#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30437#[cfg_attr(feature = "ts", derive(TS))]
30438#[cfg_attr(feature = "ts", ts(export))]
30439pub struct SIM_STATE_DATA {
30440    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
30441    pub q1: f32,
30442    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
30443    pub q2: f32,
30444    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
30445    pub q3: f32,
30446    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
30447    pub q4: f32,
30448    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
30449    pub roll: f32,
30450    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
30451    pub pitch: f32,
30452    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
30453    pub yaw: f32,
30454    #[doc = "X acceleration"]
30455    pub xacc: f32,
30456    #[doc = "Y acceleration"]
30457    pub yacc: f32,
30458    #[doc = "Z acceleration"]
30459    pub zacc: f32,
30460    #[doc = "Angular speed around X axis"]
30461    pub xgyro: f32,
30462    #[doc = "Angular speed around Y axis"]
30463    pub ygyro: f32,
30464    #[doc = "Angular speed around Z axis"]
30465    pub zgyro: f32,
30466    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
30467    pub lat: f32,
30468    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
30469    pub lon: f32,
30470    #[doc = "Altitude"]
30471    pub alt: f32,
30472    #[doc = "Horizontal position standard deviation"]
30473    pub std_dev_horz: f32,
30474    #[doc = "Vertical position standard deviation"]
30475    pub std_dev_vert: f32,
30476    #[doc = "True velocity in north direction in earth-fixed NED frame"]
30477    pub vn: f32,
30478    #[doc = "True velocity in east direction in earth-fixed NED frame"]
30479    pub ve: f32,
30480    #[doc = "True velocity in down direction in earth-fixed NED frame"]
30481    pub vd: f32,
30482    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
30483    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30484    pub lat_int: i32,
30485    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
30486    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30487    pub lon_int: i32,
30488}
30489impl SIM_STATE_DATA {
30490    pub const ENCODED_LEN: usize = 92usize;
30491    pub const DEFAULT: Self = Self {
30492        q1: 0.0_f32,
30493        q2: 0.0_f32,
30494        q3: 0.0_f32,
30495        q4: 0.0_f32,
30496        roll: 0.0_f32,
30497        pitch: 0.0_f32,
30498        yaw: 0.0_f32,
30499        xacc: 0.0_f32,
30500        yacc: 0.0_f32,
30501        zacc: 0.0_f32,
30502        xgyro: 0.0_f32,
30503        ygyro: 0.0_f32,
30504        zgyro: 0.0_f32,
30505        lat: 0.0_f32,
30506        lon: 0.0_f32,
30507        alt: 0.0_f32,
30508        std_dev_horz: 0.0_f32,
30509        std_dev_vert: 0.0_f32,
30510        vn: 0.0_f32,
30511        ve: 0.0_f32,
30512        vd: 0.0_f32,
30513        lat_int: 0_i32,
30514        lon_int: 0_i32,
30515    };
30516    #[cfg(feature = "arbitrary")]
30517    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30518        use arbitrary::{Arbitrary, Unstructured};
30519        let mut buf = [0u8; 1024];
30520        rng.fill_bytes(&mut buf);
30521        let mut unstructured = Unstructured::new(&buf);
30522        Self::arbitrary(&mut unstructured).unwrap_or_default()
30523    }
30524}
30525impl Default for SIM_STATE_DATA {
30526    fn default() -> Self {
30527        Self::DEFAULT.clone()
30528    }
30529}
30530impl MessageData for SIM_STATE_DATA {
30531    type Message = MavMessage;
30532    const ID: u32 = 108u32;
30533    const NAME: &'static str = "SIM_STATE";
30534    const EXTRA_CRC: u8 = 32u8;
30535    const ENCODED_LEN: usize = 92usize;
30536    fn deser(
30537        _version: MavlinkVersion,
30538        __input: &[u8],
30539    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30540        let avail_len = __input.len();
30541        let mut payload_buf = [0; Self::ENCODED_LEN];
30542        let mut buf = if avail_len < Self::ENCODED_LEN {
30543            payload_buf[0..avail_len].copy_from_slice(__input);
30544            Bytes::new(&payload_buf)
30545        } else {
30546            Bytes::new(__input)
30547        };
30548        let mut __struct = Self::default();
30549        __struct.q1 = buf.get_f32_le()?;
30550        __struct.q2 = buf.get_f32_le()?;
30551        __struct.q3 = buf.get_f32_le()?;
30552        __struct.q4 = buf.get_f32_le()?;
30553        __struct.roll = buf.get_f32_le()?;
30554        __struct.pitch = buf.get_f32_le()?;
30555        __struct.yaw = buf.get_f32_le()?;
30556        __struct.xacc = buf.get_f32_le()?;
30557        __struct.yacc = buf.get_f32_le()?;
30558        __struct.zacc = buf.get_f32_le()?;
30559        __struct.xgyro = buf.get_f32_le()?;
30560        __struct.ygyro = buf.get_f32_le()?;
30561        __struct.zgyro = buf.get_f32_le()?;
30562        __struct.lat = buf.get_f32_le()?;
30563        __struct.lon = buf.get_f32_le()?;
30564        __struct.alt = buf.get_f32_le()?;
30565        __struct.std_dev_horz = buf.get_f32_le()?;
30566        __struct.std_dev_vert = buf.get_f32_le()?;
30567        __struct.vn = buf.get_f32_le()?;
30568        __struct.ve = buf.get_f32_le()?;
30569        __struct.vd = buf.get_f32_le()?;
30570        __struct.lat_int = buf.get_i32_le()?;
30571        __struct.lon_int = buf.get_i32_le()?;
30572        Ok(__struct)
30573    }
30574    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30575        let mut __tmp = BytesMut::new(bytes);
30576        #[allow(clippy::absurd_extreme_comparisons)]
30577        #[allow(unused_comparisons)]
30578        if __tmp.remaining() < Self::ENCODED_LEN {
30579            panic!(
30580                "buffer is too small (need {} bytes, but got {})",
30581                Self::ENCODED_LEN,
30582                __tmp.remaining(),
30583            )
30584        }
30585        __tmp.put_f32_le(self.q1);
30586        __tmp.put_f32_le(self.q2);
30587        __tmp.put_f32_le(self.q3);
30588        __tmp.put_f32_le(self.q4);
30589        __tmp.put_f32_le(self.roll);
30590        __tmp.put_f32_le(self.pitch);
30591        __tmp.put_f32_le(self.yaw);
30592        __tmp.put_f32_le(self.xacc);
30593        __tmp.put_f32_le(self.yacc);
30594        __tmp.put_f32_le(self.zacc);
30595        __tmp.put_f32_le(self.xgyro);
30596        __tmp.put_f32_le(self.ygyro);
30597        __tmp.put_f32_le(self.zgyro);
30598        __tmp.put_f32_le(self.lat);
30599        __tmp.put_f32_le(self.lon);
30600        __tmp.put_f32_le(self.alt);
30601        __tmp.put_f32_le(self.std_dev_horz);
30602        __tmp.put_f32_le(self.std_dev_vert);
30603        __tmp.put_f32_le(self.vn);
30604        __tmp.put_f32_le(self.ve);
30605        __tmp.put_f32_le(self.vd);
30606        if matches!(version, MavlinkVersion::V2) {
30607            __tmp.put_i32_le(self.lat_int);
30608            __tmp.put_i32_le(self.lon_int);
30609            let len = __tmp.len();
30610            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30611        } else {
30612            __tmp.len()
30613        }
30614    }
30615}
30616#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
30617#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
30618#[doc = ""]
30619#[doc = "ID: 370"]
30620#[derive(Debug, Clone, PartialEq)]
30621#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30623#[cfg_attr(feature = "ts", derive(TS))]
30624#[cfg_attr(feature = "ts", ts(export))]
30625pub struct SMART_BATTERY_INFO_DATA {
30626    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
30627    pub capacity_full_specification: i32,
30628    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
30629    pub capacity_full: i32,
30630    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
30631    pub cycle_count: u16,
30632    #[doc = "Battery weight. 0: field not provided."]
30633    pub weight: u16,
30634    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
30635    pub discharge_minimum_voltage: u16,
30636    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
30637    pub charging_minimum_voltage: u16,
30638    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
30639    pub resting_minimum_voltage: u16,
30640    #[doc = "Battery ID"]
30641    pub id: u8,
30642    #[doc = "Function of the battery"]
30643    pub battery_function: MavBatteryFunction,
30644    #[doc = "Type (chemistry) of the battery"]
30645    pub mavtype: MavBatteryType,
30646    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
30647    #[cfg_attr(feature = "ts", ts(type = "string"))]
30648    pub serial_number: CharArray<16>,
30649    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
30650    #[cfg_attr(feature = "ts", ts(type = "string"))]
30651    pub device_name: CharArray<50>,
30652    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
30653    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30654    pub charging_maximum_voltage: u16,
30655    #[doc = "Number of battery cells in series. 0: field not provided."]
30656    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30657    pub cells_in_series: u8,
30658    #[doc = "Maximum pack discharge current. 0: field not provided."]
30659    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30660    pub discharge_maximum_current: u32,
30661    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
30662    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30663    pub discharge_maximum_burst_current: u32,
30664    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
30665    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30666    #[cfg_attr(feature = "ts", ts(type = "string"))]
30667    pub manufacture_date: CharArray<11>,
30668}
30669impl SMART_BATTERY_INFO_DATA {
30670    pub const ENCODED_LEN: usize = 109usize;
30671    pub const DEFAULT: Self = Self {
30672        capacity_full_specification: 0_i32,
30673        capacity_full: 0_i32,
30674        cycle_count: 0_u16,
30675        weight: 0_u16,
30676        discharge_minimum_voltage: 0_u16,
30677        charging_minimum_voltage: 0_u16,
30678        resting_minimum_voltage: 0_u16,
30679        id: 0_u8,
30680        battery_function: MavBatteryFunction::DEFAULT,
30681        mavtype: MavBatteryType::DEFAULT,
30682        serial_number: CharArray::new([0_u8; 16usize]),
30683        device_name: CharArray::new([0_u8; 50usize]),
30684        charging_maximum_voltage: 0_u16,
30685        cells_in_series: 0_u8,
30686        discharge_maximum_current: 0_u32,
30687        discharge_maximum_burst_current: 0_u32,
30688        manufacture_date: CharArray::new([0_u8; 11usize]),
30689    };
30690    #[cfg(feature = "arbitrary")]
30691    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30692        use arbitrary::{Arbitrary, Unstructured};
30693        let mut buf = [0u8; 1024];
30694        rng.fill_bytes(&mut buf);
30695        let mut unstructured = Unstructured::new(&buf);
30696        Self::arbitrary(&mut unstructured).unwrap_or_default()
30697    }
30698}
30699impl Default for SMART_BATTERY_INFO_DATA {
30700    fn default() -> Self {
30701        Self::DEFAULT.clone()
30702    }
30703}
30704impl MessageData for SMART_BATTERY_INFO_DATA {
30705    type Message = MavMessage;
30706    const ID: u32 = 370u32;
30707    const NAME: &'static str = "SMART_BATTERY_INFO";
30708    const EXTRA_CRC: u8 = 75u8;
30709    const ENCODED_LEN: usize = 109usize;
30710    fn deser(
30711        _version: MavlinkVersion,
30712        __input: &[u8],
30713    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30714        let avail_len = __input.len();
30715        let mut payload_buf = [0; Self::ENCODED_LEN];
30716        let mut buf = if avail_len < Self::ENCODED_LEN {
30717            payload_buf[0..avail_len].copy_from_slice(__input);
30718            Bytes::new(&payload_buf)
30719        } else {
30720            Bytes::new(__input)
30721        };
30722        let mut __struct = Self::default();
30723        __struct.capacity_full_specification = buf.get_i32_le()?;
30724        __struct.capacity_full = buf.get_i32_le()?;
30725        __struct.cycle_count = buf.get_u16_le()?;
30726        __struct.weight = buf.get_u16_le()?;
30727        __struct.discharge_minimum_voltage = buf.get_u16_le()?;
30728        __struct.charging_minimum_voltage = buf.get_u16_le()?;
30729        __struct.resting_minimum_voltage = buf.get_u16_le()?;
30730        __struct.id = buf.get_u8()?;
30731        let tmp = buf.get_u8()?;
30732        __struct.battery_function =
30733            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30734                enum_type: "MavBatteryFunction",
30735                value: tmp as u64,
30736            })?;
30737        let tmp = buf.get_u8()?;
30738        __struct.mavtype =
30739            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30740                enum_type: "MavBatteryType",
30741                value: tmp as u64,
30742            })?;
30743        let mut tmp = [0_u8; 16usize];
30744        for v in &mut tmp {
30745            *v = buf.get_u8()?;
30746        }
30747        __struct.serial_number = CharArray::new(tmp);
30748        let mut tmp = [0_u8; 50usize];
30749        for v in &mut tmp {
30750            *v = buf.get_u8()?;
30751        }
30752        __struct.device_name = CharArray::new(tmp);
30753        __struct.charging_maximum_voltage = buf.get_u16_le()?;
30754        __struct.cells_in_series = buf.get_u8()?;
30755        __struct.discharge_maximum_current = buf.get_u32_le()?;
30756        __struct.discharge_maximum_burst_current = buf.get_u32_le()?;
30757        let mut tmp = [0_u8; 11usize];
30758        for v in &mut tmp {
30759            *v = buf.get_u8()?;
30760        }
30761        __struct.manufacture_date = CharArray::new(tmp);
30762        Ok(__struct)
30763    }
30764    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30765        let mut __tmp = BytesMut::new(bytes);
30766        #[allow(clippy::absurd_extreme_comparisons)]
30767        #[allow(unused_comparisons)]
30768        if __tmp.remaining() < Self::ENCODED_LEN {
30769            panic!(
30770                "buffer is too small (need {} bytes, but got {})",
30771                Self::ENCODED_LEN,
30772                __tmp.remaining(),
30773            )
30774        }
30775        __tmp.put_i32_le(self.capacity_full_specification);
30776        __tmp.put_i32_le(self.capacity_full);
30777        __tmp.put_u16_le(self.cycle_count);
30778        __tmp.put_u16_le(self.weight);
30779        __tmp.put_u16_le(self.discharge_minimum_voltage);
30780        __tmp.put_u16_le(self.charging_minimum_voltage);
30781        __tmp.put_u16_le(self.resting_minimum_voltage);
30782        __tmp.put_u8(self.id);
30783        __tmp.put_u8(self.battery_function as u8);
30784        __tmp.put_u8(self.mavtype as u8);
30785        for val in &self.serial_number {
30786            __tmp.put_u8(*val);
30787        }
30788        for val in &self.device_name {
30789            __tmp.put_u8(*val);
30790        }
30791        if matches!(version, MavlinkVersion::V2) {
30792            __tmp.put_u16_le(self.charging_maximum_voltage);
30793            __tmp.put_u8(self.cells_in_series);
30794            __tmp.put_u32_le(self.discharge_maximum_current);
30795            __tmp.put_u32_le(self.discharge_maximum_burst_current);
30796            for val in &self.manufacture_date {
30797                __tmp.put_u8(*val);
30798            }
30799            let len = __tmp.len();
30800            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30801        } else {
30802            __tmp.len()
30803        }
30804    }
30805}
30806#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
30807#[doc = ""]
30808#[doc = "ID: 253"]
30809#[derive(Debug, Clone, PartialEq)]
30810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30812#[cfg_attr(feature = "ts", derive(TS))]
30813#[cfg_attr(feature = "ts", ts(export))]
30814pub struct STATUSTEXT_DATA {
30815    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
30816    pub severity: MavSeverity,
30817    #[doc = "Status text message, without null termination character"]
30818    #[cfg_attr(feature = "ts", ts(type = "string"))]
30819    pub text: CharArray<50>,
30820    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
30821    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30822    pub id: u16,
30823    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
30824    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30825    pub chunk_seq: u8,
30826}
30827impl STATUSTEXT_DATA {
30828    pub const ENCODED_LEN: usize = 54usize;
30829    pub const DEFAULT: Self = Self {
30830        severity: MavSeverity::DEFAULT,
30831        text: CharArray::new([0_u8; 50usize]),
30832        id: 0_u16,
30833        chunk_seq: 0_u8,
30834    };
30835    #[cfg(feature = "arbitrary")]
30836    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30837        use arbitrary::{Arbitrary, Unstructured};
30838        let mut buf = [0u8; 1024];
30839        rng.fill_bytes(&mut buf);
30840        let mut unstructured = Unstructured::new(&buf);
30841        Self::arbitrary(&mut unstructured).unwrap_or_default()
30842    }
30843}
30844impl Default for STATUSTEXT_DATA {
30845    fn default() -> Self {
30846        Self::DEFAULT.clone()
30847    }
30848}
30849impl MessageData for STATUSTEXT_DATA {
30850    type Message = MavMessage;
30851    const ID: u32 = 253u32;
30852    const NAME: &'static str = "STATUSTEXT";
30853    const EXTRA_CRC: u8 = 83u8;
30854    const ENCODED_LEN: usize = 54usize;
30855    fn deser(
30856        _version: MavlinkVersion,
30857        __input: &[u8],
30858    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30859        let avail_len = __input.len();
30860        let mut payload_buf = [0; Self::ENCODED_LEN];
30861        let mut buf = if avail_len < Self::ENCODED_LEN {
30862            payload_buf[0..avail_len].copy_from_slice(__input);
30863            Bytes::new(&payload_buf)
30864        } else {
30865            Bytes::new(__input)
30866        };
30867        let mut __struct = Self::default();
30868        let tmp = buf.get_u8()?;
30869        __struct.severity =
30870            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30871                enum_type: "MavSeverity",
30872                value: tmp as u64,
30873            })?;
30874        let mut tmp = [0_u8; 50usize];
30875        for v in &mut tmp {
30876            *v = buf.get_u8()?;
30877        }
30878        __struct.text = CharArray::new(tmp);
30879        __struct.id = buf.get_u16_le()?;
30880        __struct.chunk_seq = buf.get_u8()?;
30881        Ok(__struct)
30882    }
30883    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30884        let mut __tmp = BytesMut::new(bytes);
30885        #[allow(clippy::absurd_extreme_comparisons)]
30886        #[allow(unused_comparisons)]
30887        if __tmp.remaining() < Self::ENCODED_LEN {
30888            panic!(
30889                "buffer is too small (need {} bytes, but got {})",
30890                Self::ENCODED_LEN,
30891                __tmp.remaining(),
30892            )
30893        }
30894        __tmp.put_u8(self.severity as u8);
30895        for val in &self.text {
30896            __tmp.put_u8(*val);
30897        }
30898        if matches!(version, MavlinkVersion::V2) {
30899            __tmp.put_u16_le(self.id);
30900            __tmp.put_u8(self.chunk_seq);
30901            let len = __tmp.len();
30902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30903        } else {
30904            __tmp.len()
30905        }
30906    }
30907}
30908#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
30909#[doc = ""]
30910#[doc = "ID: 261"]
30911#[derive(Debug, Clone, PartialEq)]
30912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30914#[cfg_attr(feature = "ts", derive(TS))]
30915#[cfg_attr(feature = "ts", ts(export))]
30916pub struct STORAGE_INFORMATION_DATA {
30917    #[doc = "Timestamp (time since system boot)."]
30918    pub time_boot_ms: u32,
30919    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30920    pub total_capacity: f32,
30921    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30922    pub used_capacity: f32,
30923    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30924    pub available_capacity: f32,
30925    #[doc = "Read speed."]
30926    pub read_speed: f32,
30927    #[doc = "Write speed."]
30928    pub write_speed: f32,
30929    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
30930    pub storage_id: u8,
30931    #[doc = "Number of storage devices"]
30932    pub storage_count: u8,
30933    #[doc = "Status of storage"]
30934    pub status: StorageStatus,
30935    #[doc = "Type of storage"]
30936    #[cfg_attr(feature = "serde", serde(default))]
30937    pub mavtype: StorageType,
30938    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
30939    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30940    #[cfg_attr(feature = "ts", ts(type = "string"))]
30941    pub name: CharArray<32>,
30942    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
30943    #[cfg_attr(feature = "serde", serde(default))]
30944    pub storage_usage: StorageUsageFlag,
30945}
30946impl STORAGE_INFORMATION_DATA {
30947    pub const ENCODED_LEN: usize = 61usize;
30948    pub const DEFAULT: Self = Self {
30949        time_boot_ms: 0_u32,
30950        total_capacity: 0.0_f32,
30951        used_capacity: 0.0_f32,
30952        available_capacity: 0.0_f32,
30953        read_speed: 0.0_f32,
30954        write_speed: 0.0_f32,
30955        storage_id: 0_u8,
30956        storage_count: 0_u8,
30957        status: StorageStatus::DEFAULT,
30958        mavtype: StorageType::DEFAULT,
30959        name: CharArray::new([0_u8; 32usize]),
30960        storage_usage: StorageUsageFlag::DEFAULT,
30961    };
30962    #[cfg(feature = "arbitrary")]
30963    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30964        use arbitrary::{Arbitrary, Unstructured};
30965        let mut buf = [0u8; 1024];
30966        rng.fill_bytes(&mut buf);
30967        let mut unstructured = Unstructured::new(&buf);
30968        Self::arbitrary(&mut unstructured).unwrap_or_default()
30969    }
30970}
30971impl Default for STORAGE_INFORMATION_DATA {
30972    fn default() -> Self {
30973        Self::DEFAULT.clone()
30974    }
30975}
30976impl MessageData for STORAGE_INFORMATION_DATA {
30977    type Message = MavMessage;
30978    const ID: u32 = 261u32;
30979    const NAME: &'static str = "STORAGE_INFORMATION";
30980    const EXTRA_CRC: u8 = 179u8;
30981    const ENCODED_LEN: usize = 61usize;
30982    fn deser(
30983        _version: MavlinkVersion,
30984        __input: &[u8],
30985    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30986        let avail_len = __input.len();
30987        let mut payload_buf = [0; Self::ENCODED_LEN];
30988        let mut buf = if avail_len < Self::ENCODED_LEN {
30989            payload_buf[0..avail_len].copy_from_slice(__input);
30990            Bytes::new(&payload_buf)
30991        } else {
30992            Bytes::new(__input)
30993        };
30994        let mut __struct = Self::default();
30995        __struct.time_boot_ms = buf.get_u32_le()?;
30996        __struct.total_capacity = buf.get_f32_le()?;
30997        __struct.used_capacity = buf.get_f32_le()?;
30998        __struct.available_capacity = buf.get_f32_le()?;
30999        __struct.read_speed = buf.get_f32_le()?;
31000        __struct.write_speed = buf.get_f32_le()?;
31001        __struct.storage_id = buf.get_u8()?;
31002        __struct.storage_count = buf.get_u8()?;
31003        let tmp = buf.get_u8()?;
31004        __struct.status =
31005            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31006                enum_type: "StorageStatus",
31007                value: tmp as u64,
31008            })?;
31009        let tmp = buf.get_u8()?;
31010        __struct.mavtype =
31011            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31012                enum_type: "StorageType",
31013                value: tmp as u64,
31014            })?;
31015        let mut tmp = [0_u8; 32usize];
31016        for v in &mut tmp {
31017            *v = buf.get_u8()?;
31018        }
31019        __struct.name = CharArray::new(tmp);
31020        let tmp = buf.get_u8()?;
31021        __struct.storage_usage = StorageUsageFlag::from_bits(
31022            tmp as <StorageUsageFlag as Flags>::Bits,
31023        )
31024        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31025            flag_type: "StorageUsageFlag",
31026            value: tmp as u64,
31027        })?;
31028        Ok(__struct)
31029    }
31030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31031        let mut __tmp = BytesMut::new(bytes);
31032        #[allow(clippy::absurd_extreme_comparisons)]
31033        #[allow(unused_comparisons)]
31034        if __tmp.remaining() < Self::ENCODED_LEN {
31035            panic!(
31036                "buffer is too small (need {} bytes, but got {})",
31037                Self::ENCODED_LEN,
31038                __tmp.remaining(),
31039            )
31040        }
31041        __tmp.put_u32_le(self.time_boot_ms);
31042        __tmp.put_f32_le(self.total_capacity);
31043        __tmp.put_f32_le(self.used_capacity);
31044        __tmp.put_f32_le(self.available_capacity);
31045        __tmp.put_f32_le(self.read_speed);
31046        __tmp.put_f32_le(self.write_speed);
31047        __tmp.put_u8(self.storage_id);
31048        __tmp.put_u8(self.storage_count);
31049        __tmp.put_u8(self.status as u8);
31050        if matches!(version, MavlinkVersion::V2) {
31051            __tmp.put_u8(self.mavtype as u8);
31052            for val in &self.name {
31053                __tmp.put_u8(*val);
31054            }
31055            __tmp.put_u8(self.storage_usage.bits() as u8);
31056            let len = __tmp.len();
31057            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31058        } else {
31059            __tmp.len()
31060        }
31061    }
31062}
31063#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
31064#[doc = ""]
31065#[doc = "ID: 401"]
31066#[derive(Debug, Clone, PartialEq)]
31067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31068#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31069#[cfg_attr(feature = "ts", derive(TS))]
31070#[cfg_attr(feature = "ts", ts(export))]
31071pub struct SUPPORTED_TUNES_DATA {
31072    #[doc = "Bitfield of supported tune formats."]
31073    pub format: TuneFormat,
31074    #[doc = "System ID"]
31075    pub target_system: u8,
31076    #[doc = "Component ID"]
31077    pub target_component: u8,
31078}
31079impl SUPPORTED_TUNES_DATA {
31080    pub const ENCODED_LEN: usize = 6usize;
31081    pub const DEFAULT: Self = Self {
31082        format: TuneFormat::DEFAULT,
31083        target_system: 0_u8,
31084        target_component: 0_u8,
31085    };
31086    #[cfg(feature = "arbitrary")]
31087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31088        use arbitrary::{Arbitrary, Unstructured};
31089        let mut buf = [0u8; 1024];
31090        rng.fill_bytes(&mut buf);
31091        let mut unstructured = Unstructured::new(&buf);
31092        Self::arbitrary(&mut unstructured).unwrap_or_default()
31093    }
31094}
31095impl Default for SUPPORTED_TUNES_DATA {
31096    fn default() -> Self {
31097        Self::DEFAULT.clone()
31098    }
31099}
31100impl MessageData for SUPPORTED_TUNES_DATA {
31101    type Message = MavMessage;
31102    const ID: u32 = 401u32;
31103    const NAME: &'static str = "SUPPORTED_TUNES";
31104    const EXTRA_CRC: u8 = 183u8;
31105    const ENCODED_LEN: usize = 6usize;
31106    fn deser(
31107        _version: MavlinkVersion,
31108        __input: &[u8],
31109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31110        let avail_len = __input.len();
31111        let mut payload_buf = [0; Self::ENCODED_LEN];
31112        let mut buf = if avail_len < Self::ENCODED_LEN {
31113            payload_buf[0..avail_len].copy_from_slice(__input);
31114            Bytes::new(&payload_buf)
31115        } else {
31116            Bytes::new(__input)
31117        };
31118        let mut __struct = Self::default();
31119        let tmp = buf.get_u32_le()?;
31120        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
31121            ::mavlink_core::error::ParserError::InvalidEnum {
31122                enum_type: "TuneFormat",
31123                value: tmp as u64,
31124            },
31125        )?;
31126        __struct.target_system = buf.get_u8()?;
31127        __struct.target_component = buf.get_u8()?;
31128        Ok(__struct)
31129    }
31130    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31131        let mut __tmp = BytesMut::new(bytes);
31132        #[allow(clippy::absurd_extreme_comparisons)]
31133        #[allow(unused_comparisons)]
31134        if __tmp.remaining() < Self::ENCODED_LEN {
31135            panic!(
31136                "buffer is too small (need {} bytes, but got {})",
31137                Self::ENCODED_LEN,
31138                __tmp.remaining(),
31139            )
31140        }
31141        __tmp.put_u32_le(self.format as u32);
31142        __tmp.put_u8(self.target_system);
31143        __tmp.put_u8(self.target_component);
31144        if matches!(version, MavlinkVersion::V2) {
31145            let len = __tmp.len();
31146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31147        } else {
31148            __tmp.len()
31149        }
31150    }
31151}
31152#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
31153#[doc = ""]
31154#[doc = "ID: 2"]
31155#[derive(Debug, Clone, PartialEq)]
31156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31158#[cfg_attr(feature = "ts", derive(TS))]
31159#[cfg_attr(feature = "ts", ts(export))]
31160pub struct SYSTEM_TIME_DATA {
31161    #[doc = "Timestamp (UNIX epoch time)."]
31162    pub time_unix_usec: u64,
31163    #[doc = "Timestamp (time since system boot)."]
31164    pub time_boot_ms: u32,
31165}
31166impl SYSTEM_TIME_DATA {
31167    pub const ENCODED_LEN: usize = 12usize;
31168    pub const DEFAULT: Self = Self {
31169        time_unix_usec: 0_u64,
31170        time_boot_ms: 0_u32,
31171    };
31172    #[cfg(feature = "arbitrary")]
31173    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31174        use arbitrary::{Arbitrary, Unstructured};
31175        let mut buf = [0u8; 1024];
31176        rng.fill_bytes(&mut buf);
31177        let mut unstructured = Unstructured::new(&buf);
31178        Self::arbitrary(&mut unstructured).unwrap_or_default()
31179    }
31180}
31181impl Default for SYSTEM_TIME_DATA {
31182    fn default() -> Self {
31183        Self::DEFAULT.clone()
31184    }
31185}
31186impl MessageData for SYSTEM_TIME_DATA {
31187    type Message = MavMessage;
31188    const ID: u32 = 2u32;
31189    const NAME: &'static str = "SYSTEM_TIME";
31190    const EXTRA_CRC: u8 = 137u8;
31191    const ENCODED_LEN: usize = 12usize;
31192    fn deser(
31193        _version: MavlinkVersion,
31194        __input: &[u8],
31195    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31196        let avail_len = __input.len();
31197        let mut payload_buf = [0; Self::ENCODED_LEN];
31198        let mut buf = if avail_len < Self::ENCODED_LEN {
31199            payload_buf[0..avail_len].copy_from_slice(__input);
31200            Bytes::new(&payload_buf)
31201        } else {
31202            Bytes::new(__input)
31203        };
31204        let mut __struct = Self::default();
31205        __struct.time_unix_usec = buf.get_u64_le()?;
31206        __struct.time_boot_ms = buf.get_u32_le()?;
31207        Ok(__struct)
31208    }
31209    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31210        let mut __tmp = BytesMut::new(bytes);
31211        #[allow(clippy::absurd_extreme_comparisons)]
31212        #[allow(unused_comparisons)]
31213        if __tmp.remaining() < Self::ENCODED_LEN {
31214            panic!(
31215                "buffer is too small (need {} bytes, but got {})",
31216                Self::ENCODED_LEN,
31217                __tmp.remaining(),
31218            )
31219        }
31220        __tmp.put_u64_le(self.time_unix_usec);
31221        __tmp.put_u32_le(self.time_boot_ms);
31222        if matches!(version, MavlinkVersion::V2) {
31223            let len = __tmp.len();
31224            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31225        } else {
31226            __tmp.len()
31227        }
31228    }
31229}
31230#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
31231#[doc = ""]
31232#[doc = "ID: 1"]
31233#[derive(Debug, Clone, PartialEq)]
31234#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31235#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31236#[cfg_attr(feature = "ts", derive(TS))]
31237#[cfg_attr(feature = "ts", ts(export))]
31238pub struct SYS_STATUS_DATA {
31239    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31240    pub onboard_control_sensors_present: MavSysStatusSensor,
31241    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
31242    pub onboard_control_sensors_enabled: MavSysStatusSensor,
31243    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31244    pub onboard_control_sensors_health: MavSysStatusSensor,
31245    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
31246    pub load: u16,
31247    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
31248    pub voltage_battery: u16,
31249    #[doc = "Battery current, -1: Current not sent by autopilot"]
31250    pub current_battery: i16,
31251    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31252    pub drop_rate_comm: u16,
31253    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31254    pub errors_comm: u16,
31255    #[doc = "Autopilot-specific errors"]
31256    pub errors_count1: u16,
31257    #[doc = "Autopilot-specific errors"]
31258    pub errors_count2: u16,
31259    #[doc = "Autopilot-specific errors"]
31260    pub errors_count3: u16,
31261    #[doc = "Autopilot-specific errors"]
31262    pub errors_count4: u16,
31263    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
31264    pub battery_remaining: i8,
31265    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31266    #[cfg_attr(feature = "serde", serde(default))]
31267    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
31268    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
31269    #[cfg_attr(feature = "serde", serde(default))]
31270    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
31271    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31272    #[cfg_attr(feature = "serde", serde(default))]
31273    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
31274}
31275impl SYS_STATUS_DATA {
31276    pub const ENCODED_LEN: usize = 43usize;
31277    pub const DEFAULT: Self = Self {
31278        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
31279        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
31280        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
31281        load: 0_u16,
31282        voltage_battery: 0_u16,
31283        current_battery: 0_i16,
31284        drop_rate_comm: 0_u16,
31285        errors_comm: 0_u16,
31286        errors_count1: 0_u16,
31287        errors_count2: 0_u16,
31288        errors_count3: 0_u16,
31289        errors_count4: 0_u16,
31290        battery_remaining: 0_i8,
31291        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
31292        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
31293        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
31294    };
31295    #[cfg(feature = "arbitrary")]
31296    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31297        use arbitrary::{Arbitrary, Unstructured};
31298        let mut buf = [0u8; 1024];
31299        rng.fill_bytes(&mut buf);
31300        let mut unstructured = Unstructured::new(&buf);
31301        Self::arbitrary(&mut unstructured).unwrap_or_default()
31302    }
31303}
31304impl Default for SYS_STATUS_DATA {
31305    fn default() -> Self {
31306        Self::DEFAULT.clone()
31307    }
31308}
31309impl MessageData for SYS_STATUS_DATA {
31310    type Message = MavMessage;
31311    const ID: u32 = 1u32;
31312    const NAME: &'static str = "SYS_STATUS";
31313    const EXTRA_CRC: u8 = 124u8;
31314    const ENCODED_LEN: usize = 43usize;
31315    fn deser(
31316        _version: MavlinkVersion,
31317        __input: &[u8],
31318    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31319        let avail_len = __input.len();
31320        let mut payload_buf = [0; Self::ENCODED_LEN];
31321        let mut buf = if avail_len < Self::ENCODED_LEN {
31322            payload_buf[0..avail_len].copy_from_slice(__input);
31323            Bytes::new(&payload_buf)
31324        } else {
31325            Bytes::new(__input)
31326        };
31327        let mut __struct = Self::default();
31328        let tmp = buf.get_u32_le()?;
31329        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
31330            tmp as <MavSysStatusSensor as Flags>::Bits,
31331        )
31332        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31333            flag_type: "MavSysStatusSensor",
31334            value: tmp as u64,
31335        })?;
31336        let tmp = buf.get_u32_le()?;
31337        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
31338            tmp as <MavSysStatusSensor as Flags>::Bits,
31339        )
31340        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31341            flag_type: "MavSysStatusSensor",
31342            value: tmp as u64,
31343        })?;
31344        let tmp = buf.get_u32_le()?;
31345        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
31346            tmp as <MavSysStatusSensor as Flags>::Bits,
31347        )
31348        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31349            flag_type: "MavSysStatusSensor",
31350            value: tmp as u64,
31351        })?;
31352        __struct.load = buf.get_u16_le()?;
31353        __struct.voltage_battery = buf.get_u16_le()?;
31354        __struct.current_battery = buf.get_i16_le()?;
31355        __struct.drop_rate_comm = buf.get_u16_le()?;
31356        __struct.errors_comm = buf.get_u16_le()?;
31357        __struct.errors_count1 = buf.get_u16_le()?;
31358        __struct.errors_count2 = buf.get_u16_le()?;
31359        __struct.errors_count3 = buf.get_u16_le()?;
31360        __struct.errors_count4 = buf.get_u16_le()?;
31361        __struct.battery_remaining = buf.get_i8()?;
31362        let tmp = buf.get_u32_le()?;
31363        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
31364            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
31365        )
31366        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31367            flag_type: "MavSysStatusSensorExtended",
31368            value: tmp as u64,
31369        })?;
31370        let tmp = buf.get_u32_le()?;
31371        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
31372            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
31373        )
31374        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31375            flag_type: "MavSysStatusSensorExtended",
31376            value: tmp as u64,
31377        })?;
31378        let tmp = buf.get_u32_le()?;
31379        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
31380            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
31381        )
31382        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31383            flag_type: "MavSysStatusSensorExtended",
31384            value: tmp as u64,
31385        })?;
31386        Ok(__struct)
31387    }
31388    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31389        let mut __tmp = BytesMut::new(bytes);
31390        #[allow(clippy::absurd_extreme_comparisons)]
31391        #[allow(unused_comparisons)]
31392        if __tmp.remaining() < Self::ENCODED_LEN {
31393            panic!(
31394                "buffer is too small (need {} bytes, but got {})",
31395                Self::ENCODED_LEN,
31396                __tmp.remaining(),
31397            )
31398        }
31399        __tmp.put_u32_le(self.onboard_control_sensors_present.bits() as u32);
31400        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits() as u32);
31401        __tmp.put_u32_le(self.onboard_control_sensors_health.bits() as u32);
31402        __tmp.put_u16_le(self.load);
31403        __tmp.put_u16_le(self.voltage_battery);
31404        __tmp.put_i16_le(self.current_battery);
31405        __tmp.put_u16_le(self.drop_rate_comm);
31406        __tmp.put_u16_le(self.errors_comm);
31407        __tmp.put_u16_le(self.errors_count1);
31408        __tmp.put_u16_le(self.errors_count2);
31409        __tmp.put_u16_le(self.errors_count3);
31410        __tmp.put_u16_le(self.errors_count4);
31411        __tmp.put_i8(self.battery_remaining);
31412        if matches!(version, MavlinkVersion::V2) {
31413            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits() as u32);
31414            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits() as u32);
31415            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits() as u32);
31416            let len = __tmp.len();
31417            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31418        } else {
31419            __tmp.len()
31420        }
31421    }
31422}
31423#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
31424#[doc = ""]
31425#[doc = "ID: 135"]
31426#[derive(Debug, Clone, PartialEq)]
31427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31429#[cfg_attr(feature = "ts", derive(TS))]
31430#[cfg_attr(feature = "ts", ts(export))]
31431pub struct TERRAIN_CHECK_DATA {
31432    #[doc = "Latitude"]
31433    pub lat: i32,
31434    #[doc = "Longitude"]
31435    pub lon: i32,
31436}
31437impl TERRAIN_CHECK_DATA {
31438    pub const ENCODED_LEN: usize = 8usize;
31439    pub const DEFAULT: Self = Self {
31440        lat: 0_i32,
31441        lon: 0_i32,
31442    };
31443    #[cfg(feature = "arbitrary")]
31444    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31445        use arbitrary::{Arbitrary, Unstructured};
31446        let mut buf = [0u8; 1024];
31447        rng.fill_bytes(&mut buf);
31448        let mut unstructured = Unstructured::new(&buf);
31449        Self::arbitrary(&mut unstructured).unwrap_or_default()
31450    }
31451}
31452impl Default for TERRAIN_CHECK_DATA {
31453    fn default() -> Self {
31454        Self::DEFAULT.clone()
31455    }
31456}
31457impl MessageData for TERRAIN_CHECK_DATA {
31458    type Message = MavMessage;
31459    const ID: u32 = 135u32;
31460    const NAME: &'static str = "TERRAIN_CHECK";
31461    const EXTRA_CRC: u8 = 203u8;
31462    const ENCODED_LEN: usize = 8usize;
31463    fn deser(
31464        _version: MavlinkVersion,
31465        __input: &[u8],
31466    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31467        let avail_len = __input.len();
31468        let mut payload_buf = [0; Self::ENCODED_LEN];
31469        let mut buf = if avail_len < Self::ENCODED_LEN {
31470            payload_buf[0..avail_len].copy_from_slice(__input);
31471            Bytes::new(&payload_buf)
31472        } else {
31473            Bytes::new(__input)
31474        };
31475        let mut __struct = Self::default();
31476        __struct.lat = buf.get_i32_le()?;
31477        __struct.lon = buf.get_i32_le()?;
31478        Ok(__struct)
31479    }
31480    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31481        let mut __tmp = BytesMut::new(bytes);
31482        #[allow(clippy::absurd_extreme_comparisons)]
31483        #[allow(unused_comparisons)]
31484        if __tmp.remaining() < Self::ENCODED_LEN {
31485            panic!(
31486                "buffer is too small (need {} bytes, but got {})",
31487                Self::ENCODED_LEN,
31488                __tmp.remaining(),
31489            )
31490        }
31491        __tmp.put_i32_le(self.lat);
31492        __tmp.put_i32_le(self.lon);
31493        if matches!(version, MavlinkVersion::V2) {
31494            let len = __tmp.len();
31495            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31496        } else {
31497            __tmp.len()
31498        }
31499    }
31500}
31501#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31502#[doc = ""]
31503#[doc = "ID: 134"]
31504#[derive(Debug, Clone, PartialEq)]
31505#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31506#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31507#[cfg_attr(feature = "ts", derive(TS))]
31508#[cfg_attr(feature = "ts", ts(export))]
31509pub struct TERRAIN_DATA_DATA {
31510    #[doc = "Latitude of SW corner of first grid"]
31511    pub lat: i32,
31512    #[doc = "Longitude of SW corner of first grid"]
31513    pub lon: i32,
31514    #[doc = "Grid spacing"]
31515    pub grid_spacing: u16,
31516    #[doc = "Terrain data MSL"]
31517    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31518    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31519    pub data: [i16; 16],
31520    #[doc = "bit within the terrain request mask"]
31521    pub gridbit: u8,
31522}
31523impl TERRAIN_DATA_DATA {
31524    pub const ENCODED_LEN: usize = 43usize;
31525    pub const DEFAULT: Self = Self {
31526        lat: 0_i32,
31527        lon: 0_i32,
31528        grid_spacing: 0_u16,
31529        data: [0_i16; 16usize],
31530        gridbit: 0_u8,
31531    };
31532    #[cfg(feature = "arbitrary")]
31533    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31534        use arbitrary::{Arbitrary, Unstructured};
31535        let mut buf = [0u8; 1024];
31536        rng.fill_bytes(&mut buf);
31537        let mut unstructured = Unstructured::new(&buf);
31538        Self::arbitrary(&mut unstructured).unwrap_or_default()
31539    }
31540}
31541impl Default for TERRAIN_DATA_DATA {
31542    fn default() -> Self {
31543        Self::DEFAULT.clone()
31544    }
31545}
31546impl MessageData for TERRAIN_DATA_DATA {
31547    type Message = MavMessage;
31548    const ID: u32 = 134u32;
31549    const NAME: &'static str = "TERRAIN_DATA";
31550    const EXTRA_CRC: u8 = 229u8;
31551    const ENCODED_LEN: usize = 43usize;
31552    fn deser(
31553        _version: MavlinkVersion,
31554        __input: &[u8],
31555    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31556        let avail_len = __input.len();
31557        let mut payload_buf = [0; Self::ENCODED_LEN];
31558        let mut buf = if avail_len < Self::ENCODED_LEN {
31559            payload_buf[0..avail_len].copy_from_slice(__input);
31560            Bytes::new(&payload_buf)
31561        } else {
31562            Bytes::new(__input)
31563        };
31564        let mut __struct = Self::default();
31565        __struct.lat = buf.get_i32_le()?;
31566        __struct.lon = buf.get_i32_le()?;
31567        __struct.grid_spacing = buf.get_u16_le()?;
31568        for v in &mut __struct.data {
31569            let val = buf.get_i16_le()?;
31570            *v = val;
31571        }
31572        __struct.gridbit = buf.get_u8()?;
31573        Ok(__struct)
31574    }
31575    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31576        let mut __tmp = BytesMut::new(bytes);
31577        #[allow(clippy::absurd_extreme_comparisons)]
31578        #[allow(unused_comparisons)]
31579        if __tmp.remaining() < Self::ENCODED_LEN {
31580            panic!(
31581                "buffer is too small (need {} bytes, but got {})",
31582                Self::ENCODED_LEN,
31583                __tmp.remaining(),
31584            )
31585        }
31586        __tmp.put_i32_le(self.lat);
31587        __tmp.put_i32_le(self.lon);
31588        __tmp.put_u16_le(self.grid_spacing);
31589        for val in &self.data {
31590            __tmp.put_i16_le(*val);
31591        }
31592        __tmp.put_u8(self.gridbit);
31593        if matches!(version, MavlinkVersion::V2) {
31594            let len = __tmp.len();
31595            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31596        } else {
31597            __tmp.len()
31598        }
31599    }
31600}
31601#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31602#[doc = ""]
31603#[doc = "ID: 136"]
31604#[derive(Debug, Clone, PartialEq)]
31605#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31606#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31607#[cfg_attr(feature = "ts", derive(TS))]
31608#[cfg_attr(feature = "ts", ts(export))]
31609pub struct TERRAIN_REPORT_DATA {
31610    #[doc = "Latitude"]
31611    pub lat: i32,
31612    #[doc = "Longitude"]
31613    pub lon: i32,
31614    #[doc = "Terrain height MSL"]
31615    pub terrain_height: f32,
31616    #[doc = "Current vehicle height above lat/lon terrain height"]
31617    pub current_height: f32,
31618    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
31619    pub spacing: u16,
31620    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
31621    pub pending: u16,
31622    #[doc = "Number of 4x4 terrain blocks in memory"]
31623    pub loaded: u16,
31624}
31625impl TERRAIN_REPORT_DATA {
31626    pub const ENCODED_LEN: usize = 22usize;
31627    pub const DEFAULT: Self = Self {
31628        lat: 0_i32,
31629        lon: 0_i32,
31630        terrain_height: 0.0_f32,
31631        current_height: 0.0_f32,
31632        spacing: 0_u16,
31633        pending: 0_u16,
31634        loaded: 0_u16,
31635    };
31636    #[cfg(feature = "arbitrary")]
31637    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31638        use arbitrary::{Arbitrary, Unstructured};
31639        let mut buf = [0u8; 1024];
31640        rng.fill_bytes(&mut buf);
31641        let mut unstructured = Unstructured::new(&buf);
31642        Self::arbitrary(&mut unstructured).unwrap_or_default()
31643    }
31644}
31645impl Default for TERRAIN_REPORT_DATA {
31646    fn default() -> Self {
31647        Self::DEFAULT.clone()
31648    }
31649}
31650impl MessageData for TERRAIN_REPORT_DATA {
31651    type Message = MavMessage;
31652    const ID: u32 = 136u32;
31653    const NAME: &'static str = "TERRAIN_REPORT";
31654    const EXTRA_CRC: u8 = 1u8;
31655    const ENCODED_LEN: usize = 22usize;
31656    fn deser(
31657        _version: MavlinkVersion,
31658        __input: &[u8],
31659    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31660        let avail_len = __input.len();
31661        let mut payload_buf = [0; Self::ENCODED_LEN];
31662        let mut buf = if avail_len < Self::ENCODED_LEN {
31663            payload_buf[0..avail_len].copy_from_slice(__input);
31664            Bytes::new(&payload_buf)
31665        } else {
31666            Bytes::new(__input)
31667        };
31668        let mut __struct = Self::default();
31669        __struct.lat = buf.get_i32_le()?;
31670        __struct.lon = buf.get_i32_le()?;
31671        __struct.terrain_height = buf.get_f32_le()?;
31672        __struct.current_height = buf.get_f32_le()?;
31673        __struct.spacing = buf.get_u16_le()?;
31674        __struct.pending = buf.get_u16_le()?;
31675        __struct.loaded = buf.get_u16_le()?;
31676        Ok(__struct)
31677    }
31678    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31679        let mut __tmp = BytesMut::new(bytes);
31680        #[allow(clippy::absurd_extreme_comparisons)]
31681        #[allow(unused_comparisons)]
31682        if __tmp.remaining() < Self::ENCODED_LEN {
31683            panic!(
31684                "buffer is too small (need {} bytes, but got {})",
31685                Self::ENCODED_LEN,
31686                __tmp.remaining(),
31687            )
31688        }
31689        __tmp.put_i32_le(self.lat);
31690        __tmp.put_i32_le(self.lon);
31691        __tmp.put_f32_le(self.terrain_height);
31692        __tmp.put_f32_le(self.current_height);
31693        __tmp.put_u16_le(self.spacing);
31694        __tmp.put_u16_le(self.pending);
31695        __tmp.put_u16_le(self.loaded);
31696        if matches!(version, MavlinkVersion::V2) {
31697            let len = __tmp.len();
31698            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31699        } else {
31700            __tmp.len()
31701        }
31702    }
31703}
31704#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31705#[doc = ""]
31706#[doc = "ID: 133"]
31707#[derive(Debug, Clone, PartialEq)]
31708#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31709#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31710#[cfg_attr(feature = "ts", derive(TS))]
31711#[cfg_attr(feature = "ts", ts(export))]
31712pub struct TERRAIN_REQUEST_DATA {
31713    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
31714    pub mask: u64,
31715    #[doc = "Latitude of SW corner of first grid"]
31716    pub lat: i32,
31717    #[doc = "Longitude of SW corner of first grid"]
31718    pub lon: i32,
31719    #[doc = "Grid spacing"]
31720    pub grid_spacing: u16,
31721}
31722impl TERRAIN_REQUEST_DATA {
31723    pub const ENCODED_LEN: usize = 18usize;
31724    pub const DEFAULT: Self = Self {
31725        mask: 0_u64,
31726        lat: 0_i32,
31727        lon: 0_i32,
31728        grid_spacing: 0_u16,
31729    };
31730    #[cfg(feature = "arbitrary")]
31731    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31732        use arbitrary::{Arbitrary, Unstructured};
31733        let mut buf = [0u8; 1024];
31734        rng.fill_bytes(&mut buf);
31735        let mut unstructured = Unstructured::new(&buf);
31736        Self::arbitrary(&mut unstructured).unwrap_or_default()
31737    }
31738}
31739impl Default for TERRAIN_REQUEST_DATA {
31740    fn default() -> Self {
31741        Self::DEFAULT.clone()
31742    }
31743}
31744impl MessageData for TERRAIN_REQUEST_DATA {
31745    type Message = MavMessage;
31746    const ID: u32 = 133u32;
31747    const NAME: &'static str = "TERRAIN_REQUEST";
31748    const EXTRA_CRC: u8 = 6u8;
31749    const ENCODED_LEN: usize = 18usize;
31750    fn deser(
31751        _version: MavlinkVersion,
31752        __input: &[u8],
31753    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31754        let avail_len = __input.len();
31755        let mut payload_buf = [0; Self::ENCODED_LEN];
31756        let mut buf = if avail_len < Self::ENCODED_LEN {
31757            payload_buf[0..avail_len].copy_from_slice(__input);
31758            Bytes::new(&payload_buf)
31759        } else {
31760            Bytes::new(__input)
31761        };
31762        let mut __struct = Self::default();
31763        __struct.mask = buf.get_u64_le()?;
31764        __struct.lat = buf.get_i32_le()?;
31765        __struct.lon = buf.get_i32_le()?;
31766        __struct.grid_spacing = buf.get_u16_le()?;
31767        Ok(__struct)
31768    }
31769    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31770        let mut __tmp = BytesMut::new(bytes);
31771        #[allow(clippy::absurd_extreme_comparisons)]
31772        #[allow(unused_comparisons)]
31773        if __tmp.remaining() < Self::ENCODED_LEN {
31774            panic!(
31775                "buffer is too small (need {} bytes, but got {})",
31776                Self::ENCODED_LEN,
31777                __tmp.remaining(),
31778            )
31779        }
31780        __tmp.put_u64_le(self.mask);
31781        __tmp.put_i32_le(self.lat);
31782        __tmp.put_i32_le(self.lon);
31783        __tmp.put_u16_le(self.grid_spacing);
31784        if matches!(version, MavlinkVersion::V2) {
31785            let len = __tmp.len();
31786            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31787        } else {
31788            __tmp.len()
31789        }
31790    }
31791}
31792#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
31793#[doc = ""]
31794#[doc = "ID: 111"]
31795#[derive(Debug, Clone, PartialEq)]
31796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31798#[cfg_attr(feature = "ts", derive(TS))]
31799#[cfg_attr(feature = "ts", ts(export))]
31800pub struct TIMESYNC_DATA {
31801    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
31802    pub tc1: i64,
31803    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
31804    pub ts1: i64,
31805    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
31806    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31807    pub target_system: u8,
31808    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
31809    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31810    pub target_component: u8,
31811}
31812impl TIMESYNC_DATA {
31813    pub const ENCODED_LEN: usize = 18usize;
31814    pub const DEFAULT: Self = Self {
31815        tc1: 0_i64,
31816        ts1: 0_i64,
31817        target_system: 0_u8,
31818        target_component: 0_u8,
31819    };
31820    #[cfg(feature = "arbitrary")]
31821    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31822        use arbitrary::{Arbitrary, Unstructured};
31823        let mut buf = [0u8; 1024];
31824        rng.fill_bytes(&mut buf);
31825        let mut unstructured = Unstructured::new(&buf);
31826        Self::arbitrary(&mut unstructured).unwrap_or_default()
31827    }
31828}
31829impl Default for TIMESYNC_DATA {
31830    fn default() -> Self {
31831        Self::DEFAULT.clone()
31832    }
31833}
31834impl MessageData for TIMESYNC_DATA {
31835    type Message = MavMessage;
31836    const ID: u32 = 111u32;
31837    const NAME: &'static str = "TIMESYNC";
31838    const EXTRA_CRC: u8 = 34u8;
31839    const ENCODED_LEN: usize = 18usize;
31840    fn deser(
31841        _version: MavlinkVersion,
31842        __input: &[u8],
31843    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31844        let avail_len = __input.len();
31845        let mut payload_buf = [0; Self::ENCODED_LEN];
31846        let mut buf = if avail_len < Self::ENCODED_LEN {
31847            payload_buf[0..avail_len].copy_from_slice(__input);
31848            Bytes::new(&payload_buf)
31849        } else {
31850            Bytes::new(__input)
31851        };
31852        let mut __struct = Self::default();
31853        __struct.tc1 = buf.get_i64_le()?;
31854        __struct.ts1 = buf.get_i64_le()?;
31855        __struct.target_system = buf.get_u8()?;
31856        __struct.target_component = buf.get_u8()?;
31857        Ok(__struct)
31858    }
31859    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31860        let mut __tmp = BytesMut::new(bytes);
31861        #[allow(clippy::absurd_extreme_comparisons)]
31862        #[allow(unused_comparisons)]
31863        if __tmp.remaining() < Self::ENCODED_LEN {
31864            panic!(
31865                "buffer is too small (need {} bytes, but got {})",
31866                Self::ENCODED_LEN,
31867                __tmp.remaining(),
31868            )
31869        }
31870        __tmp.put_i64_le(self.tc1);
31871        __tmp.put_i64_le(self.ts1);
31872        if matches!(version, MavlinkVersion::V2) {
31873            __tmp.put_u8(self.target_system);
31874            __tmp.put_u8(self.target_component);
31875            let len = __tmp.len();
31876            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31877        } else {
31878            __tmp.len()
31879        }
31880    }
31881}
31882#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
31883#[doc = ""]
31884#[doc = "ID: 380"]
31885#[derive(Debug, Clone, PartialEq)]
31886#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31887#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31888#[cfg_attr(feature = "ts", derive(TS))]
31889#[cfg_attr(feature = "ts", ts(export))]
31890pub struct TIME_ESTIMATE_TO_TARGET_DATA {
31891    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
31892    pub safe_return: i32,
31893    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
31894    pub land: i32,
31895    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
31896    pub mission_next_item: i32,
31897    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
31898    pub mission_end: i32,
31899    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
31900    pub commanded_action: i32,
31901}
31902impl TIME_ESTIMATE_TO_TARGET_DATA {
31903    pub const ENCODED_LEN: usize = 20usize;
31904    pub const DEFAULT: Self = Self {
31905        safe_return: 0_i32,
31906        land: 0_i32,
31907        mission_next_item: 0_i32,
31908        mission_end: 0_i32,
31909        commanded_action: 0_i32,
31910    };
31911    #[cfg(feature = "arbitrary")]
31912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31913        use arbitrary::{Arbitrary, Unstructured};
31914        let mut buf = [0u8; 1024];
31915        rng.fill_bytes(&mut buf);
31916        let mut unstructured = Unstructured::new(&buf);
31917        Self::arbitrary(&mut unstructured).unwrap_or_default()
31918    }
31919}
31920impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
31921    fn default() -> Self {
31922        Self::DEFAULT.clone()
31923    }
31924}
31925impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
31926    type Message = MavMessage;
31927    const ID: u32 = 380u32;
31928    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
31929    const EXTRA_CRC: u8 = 232u8;
31930    const ENCODED_LEN: usize = 20usize;
31931    fn deser(
31932        _version: MavlinkVersion,
31933        __input: &[u8],
31934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31935        let avail_len = __input.len();
31936        let mut payload_buf = [0; Self::ENCODED_LEN];
31937        let mut buf = if avail_len < Self::ENCODED_LEN {
31938            payload_buf[0..avail_len].copy_from_slice(__input);
31939            Bytes::new(&payload_buf)
31940        } else {
31941            Bytes::new(__input)
31942        };
31943        let mut __struct = Self::default();
31944        __struct.safe_return = buf.get_i32_le()?;
31945        __struct.land = buf.get_i32_le()?;
31946        __struct.mission_next_item = buf.get_i32_le()?;
31947        __struct.mission_end = buf.get_i32_le()?;
31948        __struct.commanded_action = buf.get_i32_le()?;
31949        Ok(__struct)
31950    }
31951    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31952        let mut __tmp = BytesMut::new(bytes);
31953        #[allow(clippy::absurd_extreme_comparisons)]
31954        #[allow(unused_comparisons)]
31955        if __tmp.remaining() < Self::ENCODED_LEN {
31956            panic!(
31957                "buffer is too small (need {} bytes, but got {})",
31958                Self::ENCODED_LEN,
31959                __tmp.remaining(),
31960            )
31961        }
31962        __tmp.put_i32_le(self.safe_return);
31963        __tmp.put_i32_le(self.land);
31964        __tmp.put_i32_le(self.mission_next_item);
31965        __tmp.put_i32_le(self.mission_end);
31966        __tmp.put_i32_le(self.commanded_action);
31967        if matches!(version, MavlinkVersion::V2) {
31968            let len = __tmp.len();
31969            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31970        } else {
31971            __tmp.len()
31972        }
31973    }
31974}
31975#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
31976#[doc = ""]
31977#[doc = "ID: 333"]
31978#[derive(Debug, Clone, PartialEq)]
31979#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31980#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31981#[cfg_attr(feature = "ts", derive(TS))]
31982#[cfg_attr(feature = "ts", ts(export))]
31983pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31984    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31985    pub time_usec: u64,
31986    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
31987    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31988    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31989    pub pos_x: [f32; 5],
31990    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
31991    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31992    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31993    pub pos_y: [f32; 5],
31994    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
31995    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31996    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31997    pub pos_z: [f32; 5],
31998    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
31999    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32000    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32001    pub delta: [f32; 5],
32002    #[doc = "Yaw. Set to NaN for unchanged"]
32003    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32004    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32005    pub pos_yaw: [f32; 5],
32006    #[doc = "Number of valid control points (up-to 5 points are possible)"]
32007    pub valid_points: u8,
32008}
32009impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32010    pub const ENCODED_LEN: usize = 109usize;
32011    pub const DEFAULT: Self = Self {
32012        time_usec: 0_u64,
32013        pos_x: [0.0_f32; 5usize],
32014        pos_y: [0.0_f32; 5usize],
32015        pos_z: [0.0_f32; 5usize],
32016        delta: [0.0_f32; 5usize],
32017        pos_yaw: [0.0_f32; 5usize],
32018        valid_points: 0_u8,
32019    };
32020    #[cfg(feature = "arbitrary")]
32021    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32022        use arbitrary::{Arbitrary, Unstructured};
32023        let mut buf = [0u8; 1024];
32024        rng.fill_bytes(&mut buf);
32025        let mut unstructured = Unstructured::new(&buf);
32026        Self::arbitrary(&mut unstructured).unwrap_or_default()
32027    }
32028}
32029impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32030    fn default() -> Self {
32031        Self::DEFAULT.clone()
32032    }
32033}
32034impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32035    type Message = MavMessage;
32036    const ID: u32 = 333u32;
32037    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
32038    const EXTRA_CRC: u8 = 231u8;
32039    const ENCODED_LEN: usize = 109usize;
32040    fn deser(
32041        _version: MavlinkVersion,
32042        __input: &[u8],
32043    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32044        let avail_len = __input.len();
32045        let mut payload_buf = [0; Self::ENCODED_LEN];
32046        let mut buf = if avail_len < Self::ENCODED_LEN {
32047            payload_buf[0..avail_len].copy_from_slice(__input);
32048            Bytes::new(&payload_buf)
32049        } else {
32050            Bytes::new(__input)
32051        };
32052        let mut __struct = Self::default();
32053        __struct.time_usec = buf.get_u64_le()?;
32054        for v in &mut __struct.pos_x {
32055            let val = buf.get_f32_le()?;
32056            *v = val;
32057        }
32058        for v in &mut __struct.pos_y {
32059            let val = buf.get_f32_le()?;
32060            *v = val;
32061        }
32062        for v in &mut __struct.pos_z {
32063            let val = buf.get_f32_le()?;
32064            *v = val;
32065        }
32066        for v in &mut __struct.delta {
32067            let val = buf.get_f32_le()?;
32068            *v = val;
32069        }
32070        for v in &mut __struct.pos_yaw {
32071            let val = buf.get_f32_le()?;
32072            *v = val;
32073        }
32074        __struct.valid_points = buf.get_u8()?;
32075        Ok(__struct)
32076    }
32077    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32078        let mut __tmp = BytesMut::new(bytes);
32079        #[allow(clippy::absurd_extreme_comparisons)]
32080        #[allow(unused_comparisons)]
32081        if __tmp.remaining() < Self::ENCODED_LEN {
32082            panic!(
32083                "buffer is too small (need {} bytes, but got {})",
32084                Self::ENCODED_LEN,
32085                __tmp.remaining(),
32086            )
32087        }
32088        __tmp.put_u64_le(self.time_usec);
32089        for val in &self.pos_x {
32090            __tmp.put_f32_le(*val);
32091        }
32092        for val in &self.pos_y {
32093            __tmp.put_f32_le(*val);
32094        }
32095        for val in &self.pos_z {
32096            __tmp.put_f32_le(*val);
32097        }
32098        for val in &self.delta {
32099            __tmp.put_f32_le(*val);
32100        }
32101        for val in &self.pos_yaw {
32102            __tmp.put_f32_le(*val);
32103        }
32104        __tmp.put_u8(self.valid_points);
32105        if matches!(version, MavlinkVersion::V2) {
32106            let len = __tmp.len();
32107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32108        } else {
32109            __tmp.len()
32110        }
32111    }
32112}
32113#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
32114#[doc = ""]
32115#[doc = "ID: 332"]
32116#[derive(Debug, Clone, PartialEq)]
32117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32119#[cfg_attr(feature = "ts", derive(TS))]
32120#[cfg_attr(feature = "ts", ts(export))]
32121pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32122    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32123    pub time_usec: u64,
32124    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
32125    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32126    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32127    pub pos_x: [f32; 5],
32128    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
32129    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32130    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32131    pub pos_y: [f32; 5],
32132    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
32133    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32134    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32135    pub pos_z: [f32; 5],
32136    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
32137    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32138    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32139    pub vel_x: [f32; 5],
32140    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
32141    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32142    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32143    pub vel_y: [f32; 5],
32144    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
32145    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32146    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32147    pub vel_z: [f32; 5],
32148    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
32149    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32150    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32151    pub acc_x: [f32; 5],
32152    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
32153    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32154    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32155    pub acc_y: [f32; 5],
32156    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
32157    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32158    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32159    pub acc_z: [f32; 5],
32160    #[doc = "Yaw angle, set to NaN if not being used"]
32161    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32162    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32163    pub pos_yaw: [f32; 5],
32164    #[doc = "Yaw rate, set to NaN if not being used"]
32165    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32166    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32167    pub vel_yaw: [f32; 5],
32168    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
32169    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32170    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32171    pub command: [u16; 5],
32172    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
32173    pub valid_points: u8,
32174}
32175impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32176    pub const ENCODED_LEN: usize = 239usize;
32177    pub const DEFAULT: Self = Self {
32178        time_usec: 0_u64,
32179        pos_x: [0.0_f32; 5usize],
32180        pos_y: [0.0_f32; 5usize],
32181        pos_z: [0.0_f32; 5usize],
32182        vel_x: [0.0_f32; 5usize],
32183        vel_y: [0.0_f32; 5usize],
32184        vel_z: [0.0_f32; 5usize],
32185        acc_x: [0.0_f32; 5usize],
32186        acc_y: [0.0_f32; 5usize],
32187        acc_z: [0.0_f32; 5usize],
32188        pos_yaw: [0.0_f32; 5usize],
32189        vel_yaw: [0.0_f32; 5usize],
32190        command: [0_u16; 5usize],
32191        valid_points: 0_u8,
32192    };
32193    #[cfg(feature = "arbitrary")]
32194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32195        use arbitrary::{Arbitrary, Unstructured};
32196        let mut buf = [0u8; 1024];
32197        rng.fill_bytes(&mut buf);
32198        let mut unstructured = Unstructured::new(&buf);
32199        Self::arbitrary(&mut unstructured).unwrap_or_default()
32200    }
32201}
32202impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32203    fn default() -> Self {
32204        Self::DEFAULT.clone()
32205    }
32206}
32207impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32208    type Message = MavMessage;
32209    const ID: u32 = 332u32;
32210    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
32211    const EXTRA_CRC: u8 = 236u8;
32212    const ENCODED_LEN: usize = 239usize;
32213    fn deser(
32214        _version: MavlinkVersion,
32215        __input: &[u8],
32216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32217        let avail_len = __input.len();
32218        let mut payload_buf = [0; Self::ENCODED_LEN];
32219        let mut buf = if avail_len < Self::ENCODED_LEN {
32220            payload_buf[0..avail_len].copy_from_slice(__input);
32221            Bytes::new(&payload_buf)
32222        } else {
32223            Bytes::new(__input)
32224        };
32225        let mut __struct = Self::default();
32226        __struct.time_usec = buf.get_u64_le()?;
32227        for v in &mut __struct.pos_x {
32228            let val = buf.get_f32_le()?;
32229            *v = val;
32230        }
32231        for v in &mut __struct.pos_y {
32232            let val = buf.get_f32_le()?;
32233            *v = val;
32234        }
32235        for v in &mut __struct.pos_z {
32236            let val = buf.get_f32_le()?;
32237            *v = val;
32238        }
32239        for v in &mut __struct.vel_x {
32240            let val = buf.get_f32_le()?;
32241            *v = val;
32242        }
32243        for v in &mut __struct.vel_y {
32244            let val = buf.get_f32_le()?;
32245            *v = val;
32246        }
32247        for v in &mut __struct.vel_z {
32248            let val = buf.get_f32_le()?;
32249            *v = val;
32250        }
32251        for v in &mut __struct.acc_x {
32252            let val = buf.get_f32_le()?;
32253            *v = val;
32254        }
32255        for v in &mut __struct.acc_y {
32256            let val = buf.get_f32_le()?;
32257            *v = val;
32258        }
32259        for v in &mut __struct.acc_z {
32260            let val = buf.get_f32_le()?;
32261            *v = val;
32262        }
32263        for v in &mut __struct.pos_yaw {
32264            let val = buf.get_f32_le()?;
32265            *v = val;
32266        }
32267        for v in &mut __struct.vel_yaw {
32268            let val = buf.get_f32_le()?;
32269            *v = val;
32270        }
32271        for v in &mut __struct.command {
32272            let val = buf.get_u16_le()?;
32273            *v = val;
32274        }
32275        __struct.valid_points = buf.get_u8()?;
32276        Ok(__struct)
32277    }
32278    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32279        let mut __tmp = BytesMut::new(bytes);
32280        #[allow(clippy::absurd_extreme_comparisons)]
32281        #[allow(unused_comparisons)]
32282        if __tmp.remaining() < Self::ENCODED_LEN {
32283            panic!(
32284                "buffer is too small (need {} bytes, but got {})",
32285                Self::ENCODED_LEN,
32286                __tmp.remaining(),
32287            )
32288        }
32289        __tmp.put_u64_le(self.time_usec);
32290        for val in &self.pos_x {
32291            __tmp.put_f32_le(*val);
32292        }
32293        for val in &self.pos_y {
32294            __tmp.put_f32_le(*val);
32295        }
32296        for val in &self.pos_z {
32297            __tmp.put_f32_le(*val);
32298        }
32299        for val in &self.vel_x {
32300            __tmp.put_f32_le(*val);
32301        }
32302        for val in &self.vel_y {
32303            __tmp.put_f32_le(*val);
32304        }
32305        for val in &self.vel_z {
32306            __tmp.put_f32_le(*val);
32307        }
32308        for val in &self.acc_x {
32309            __tmp.put_f32_le(*val);
32310        }
32311        for val in &self.acc_y {
32312            __tmp.put_f32_le(*val);
32313        }
32314        for val in &self.acc_z {
32315            __tmp.put_f32_le(*val);
32316        }
32317        for val in &self.pos_yaw {
32318            __tmp.put_f32_le(*val);
32319        }
32320        for val in &self.vel_yaw {
32321            __tmp.put_f32_le(*val);
32322        }
32323        for val in &self.command {
32324            __tmp.put_u16_le(*val);
32325        }
32326        __tmp.put_u8(self.valid_points);
32327        if matches!(version, MavlinkVersion::V2) {
32328            let len = __tmp.len();
32329            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32330        } else {
32331            __tmp.len()
32332        }
32333    }
32334}
32335#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
32336#[doc = ""]
32337#[doc = "ID: 385"]
32338#[derive(Debug, Clone, PartialEq)]
32339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32340#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32341#[cfg_attr(feature = "ts", derive(TS))]
32342#[cfg_attr(feature = "ts", ts(export))]
32343pub struct TUNNEL_DATA {
32344    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32345    pub payload_type: MavTunnelPayloadType,
32346    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
32347    pub target_system: u8,
32348    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
32349    pub target_component: u8,
32350    #[doc = "Length of the data transported in payload"]
32351    pub payload_length: u8,
32352    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
32353    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32354    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32355    pub payload: [u8; 128],
32356}
32357impl TUNNEL_DATA {
32358    pub const ENCODED_LEN: usize = 133usize;
32359    pub const DEFAULT: Self = Self {
32360        payload_type: MavTunnelPayloadType::DEFAULT,
32361        target_system: 0_u8,
32362        target_component: 0_u8,
32363        payload_length: 0_u8,
32364        payload: [0_u8; 128usize],
32365    };
32366    #[cfg(feature = "arbitrary")]
32367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32368        use arbitrary::{Arbitrary, Unstructured};
32369        let mut buf = [0u8; 1024];
32370        rng.fill_bytes(&mut buf);
32371        let mut unstructured = Unstructured::new(&buf);
32372        Self::arbitrary(&mut unstructured).unwrap_or_default()
32373    }
32374}
32375impl Default for TUNNEL_DATA {
32376    fn default() -> Self {
32377        Self::DEFAULT.clone()
32378    }
32379}
32380impl MessageData for TUNNEL_DATA {
32381    type Message = MavMessage;
32382    const ID: u32 = 385u32;
32383    const NAME: &'static str = "TUNNEL";
32384    const EXTRA_CRC: u8 = 147u8;
32385    const ENCODED_LEN: usize = 133usize;
32386    fn deser(
32387        _version: MavlinkVersion,
32388        __input: &[u8],
32389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32390        let avail_len = __input.len();
32391        let mut payload_buf = [0; Self::ENCODED_LEN];
32392        let mut buf = if avail_len < Self::ENCODED_LEN {
32393            payload_buf[0..avail_len].copy_from_slice(__input);
32394            Bytes::new(&payload_buf)
32395        } else {
32396            Bytes::new(__input)
32397        };
32398        let mut __struct = Self::default();
32399        let tmp = buf.get_u16_le()?;
32400        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
32401            ::mavlink_core::error::ParserError::InvalidEnum {
32402                enum_type: "MavTunnelPayloadType",
32403                value: tmp as u64,
32404            },
32405        )?;
32406        __struct.target_system = buf.get_u8()?;
32407        __struct.target_component = buf.get_u8()?;
32408        __struct.payload_length = buf.get_u8()?;
32409        for v in &mut __struct.payload {
32410            let val = buf.get_u8()?;
32411            *v = val;
32412        }
32413        Ok(__struct)
32414    }
32415    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32416        let mut __tmp = BytesMut::new(bytes);
32417        #[allow(clippy::absurd_extreme_comparisons)]
32418        #[allow(unused_comparisons)]
32419        if __tmp.remaining() < Self::ENCODED_LEN {
32420            panic!(
32421                "buffer is too small (need {} bytes, but got {})",
32422                Self::ENCODED_LEN,
32423                __tmp.remaining(),
32424            )
32425        }
32426        __tmp.put_u16_le(self.payload_type as u16);
32427        __tmp.put_u8(self.target_system);
32428        __tmp.put_u8(self.target_component);
32429        __tmp.put_u8(self.payload_length);
32430        for val in &self.payload {
32431            __tmp.put_u8(*val);
32432        }
32433        if matches!(version, MavlinkVersion::V2) {
32434            let len = __tmp.len();
32435            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32436        } else {
32437            __tmp.len()
32438        }
32439    }
32440}
32441#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
32442#[doc = ""]
32443#[doc = "ID: 311"]
32444#[derive(Debug, Clone, PartialEq)]
32445#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32446#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32447#[cfg_attr(feature = "ts", derive(TS))]
32448#[cfg_attr(feature = "ts", ts(export))]
32449pub struct UAVCAN_NODE_INFO_DATA {
32450    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32451    pub time_usec: u64,
32452    #[doc = "Time since the start-up of the node."]
32453    pub uptime_sec: u32,
32454    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
32455    pub sw_vcs_commit: u32,
32456    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
32457    #[cfg_attr(feature = "ts", ts(type = "string"))]
32458    pub name: CharArray<80>,
32459    #[doc = "Hardware major version number."]
32460    pub hw_version_major: u8,
32461    #[doc = "Hardware minor version number."]
32462    pub hw_version_minor: u8,
32463    #[doc = "Hardware unique 128-bit ID."]
32464    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32465    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32466    pub hw_unique_id: [u8; 16],
32467    #[doc = "Software major version number."]
32468    pub sw_version_major: u8,
32469    #[doc = "Software minor version number."]
32470    pub sw_version_minor: u8,
32471}
32472impl UAVCAN_NODE_INFO_DATA {
32473    pub const ENCODED_LEN: usize = 116usize;
32474    pub const DEFAULT: Self = Self {
32475        time_usec: 0_u64,
32476        uptime_sec: 0_u32,
32477        sw_vcs_commit: 0_u32,
32478        name: CharArray::new([0_u8; 80usize]),
32479        hw_version_major: 0_u8,
32480        hw_version_minor: 0_u8,
32481        hw_unique_id: [0_u8; 16usize],
32482        sw_version_major: 0_u8,
32483        sw_version_minor: 0_u8,
32484    };
32485    #[cfg(feature = "arbitrary")]
32486    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32487        use arbitrary::{Arbitrary, Unstructured};
32488        let mut buf = [0u8; 1024];
32489        rng.fill_bytes(&mut buf);
32490        let mut unstructured = Unstructured::new(&buf);
32491        Self::arbitrary(&mut unstructured).unwrap_or_default()
32492    }
32493}
32494impl Default for UAVCAN_NODE_INFO_DATA {
32495    fn default() -> Self {
32496        Self::DEFAULT.clone()
32497    }
32498}
32499impl MessageData for UAVCAN_NODE_INFO_DATA {
32500    type Message = MavMessage;
32501    const ID: u32 = 311u32;
32502    const NAME: &'static str = "UAVCAN_NODE_INFO";
32503    const EXTRA_CRC: u8 = 95u8;
32504    const ENCODED_LEN: usize = 116usize;
32505    fn deser(
32506        _version: MavlinkVersion,
32507        __input: &[u8],
32508    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32509        let avail_len = __input.len();
32510        let mut payload_buf = [0; Self::ENCODED_LEN];
32511        let mut buf = if avail_len < Self::ENCODED_LEN {
32512            payload_buf[0..avail_len].copy_from_slice(__input);
32513            Bytes::new(&payload_buf)
32514        } else {
32515            Bytes::new(__input)
32516        };
32517        let mut __struct = Self::default();
32518        __struct.time_usec = buf.get_u64_le()?;
32519        __struct.uptime_sec = buf.get_u32_le()?;
32520        __struct.sw_vcs_commit = buf.get_u32_le()?;
32521        let mut tmp = [0_u8; 80usize];
32522        for v in &mut tmp {
32523            *v = buf.get_u8()?;
32524        }
32525        __struct.name = CharArray::new(tmp);
32526        __struct.hw_version_major = buf.get_u8()?;
32527        __struct.hw_version_minor = buf.get_u8()?;
32528        for v in &mut __struct.hw_unique_id {
32529            let val = buf.get_u8()?;
32530            *v = val;
32531        }
32532        __struct.sw_version_major = buf.get_u8()?;
32533        __struct.sw_version_minor = buf.get_u8()?;
32534        Ok(__struct)
32535    }
32536    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32537        let mut __tmp = BytesMut::new(bytes);
32538        #[allow(clippy::absurd_extreme_comparisons)]
32539        #[allow(unused_comparisons)]
32540        if __tmp.remaining() < Self::ENCODED_LEN {
32541            panic!(
32542                "buffer is too small (need {} bytes, but got {})",
32543                Self::ENCODED_LEN,
32544                __tmp.remaining(),
32545            )
32546        }
32547        __tmp.put_u64_le(self.time_usec);
32548        __tmp.put_u32_le(self.uptime_sec);
32549        __tmp.put_u32_le(self.sw_vcs_commit);
32550        for val in &self.name {
32551            __tmp.put_u8(*val);
32552        }
32553        __tmp.put_u8(self.hw_version_major);
32554        __tmp.put_u8(self.hw_version_minor);
32555        for val in &self.hw_unique_id {
32556            __tmp.put_u8(*val);
32557        }
32558        __tmp.put_u8(self.sw_version_major);
32559        __tmp.put_u8(self.sw_version_minor);
32560        if matches!(version, MavlinkVersion::V2) {
32561            let len = __tmp.len();
32562            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32563        } else {
32564            __tmp.len()
32565        }
32566    }
32567}
32568#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
32569#[doc = ""]
32570#[doc = "ID: 310"]
32571#[derive(Debug, Clone, PartialEq)]
32572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32573#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32574#[cfg_attr(feature = "ts", derive(TS))]
32575#[cfg_attr(feature = "ts", ts(export))]
32576pub struct UAVCAN_NODE_STATUS_DATA {
32577    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32578    pub time_usec: u64,
32579    #[doc = "Time since the start-up of the node."]
32580    pub uptime_sec: u32,
32581    #[doc = "Vendor-specific status information."]
32582    pub vendor_specific_status_code: u16,
32583    #[doc = "Generalized node health status."]
32584    pub health: UavcanNodeHealth,
32585    #[doc = "Generalized operating mode."]
32586    pub mode: UavcanNodeMode,
32587    #[doc = "Not used currently."]
32588    pub sub_mode: u8,
32589}
32590impl UAVCAN_NODE_STATUS_DATA {
32591    pub const ENCODED_LEN: usize = 17usize;
32592    pub const DEFAULT: Self = Self {
32593        time_usec: 0_u64,
32594        uptime_sec: 0_u32,
32595        vendor_specific_status_code: 0_u16,
32596        health: UavcanNodeHealth::DEFAULT,
32597        mode: UavcanNodeMode::DEFAULT,
32598        sub_mode: 0_u8,
32599    };
32600    #[cfg(feature = "arbitrary")]
32601    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32602        use arbitrary::{Arbitrary, Unstructured};
32603        let mut buf = [0u8; 1024];
32604        rng.fill_bytes(&mut buf);
32605        let mut unstructured = Unstructured::new(&buf);
32606        Self::arbitrary(&mut unstructured).unwrap_or_default()
32607    }
32608}
32609impl Default for UAVCAN_NODE_STATUS_DATA {
32610    fn default() -> Self {
32611        Self::DEFAULT.clone()
32612    }
32613}
32614impl MessageData for UAVCAN_NODE_STATUS_DATA {
32615    type Message = MavMessage;
32616    const ID: u32 = 310u32;
32617    const NAME: &'static str = "UAVCAN_NODE_STATUS";
32618    const EXTRA_CRC: u8 = 28u8;
32619    const ENCODED_LEN: usize = 17usize;
32620    fn deser(
32621        _version: MavlinkVersion,
32622        __input: &[u8],
32623    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32624        let avail_len = __input.len();
32625        let mut payload_buf = [0; Self::ENCODED_LEN];
32626        let mut buf = if avail_len < Self::ENCODED_LEN {
32627            payload_buf[0..avail_len].copy_from_slice(__input);
32628            Bytes::new(&payload_buf)
32629        } else {
32630            Bytes::new(__input)
32631        };
32632        let mut __struct = Self::default();
32633        __struct.time_usec = buf.get_u64_le()?;
32634        __struct.uptime_sec = buf.get_u32_le()?;
32635        __struct.vendor_specific_status_code = buf.get_u16_le()?;
32636        let tmp = buf.get_u8()?;
32637        __struct.health =
32638            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32639                enum_type: "UavcanNodeHealth",
32640                value: tmp as u64,
32641            })?;
32642        let tmp = buf.get_u8()?;
32643        __struct.mode =
32644            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32645                enum_type: "UavcanNodeMode",
32646                value: tmp as u64,
32647            })?;
32648        __struct.sub_mode = buf.get_u8()?;
32649        Ok(__struct)
32650    }
32651    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32652        let mut __tmp = BytesMut::new(bytes);
32653        #[allow(clippy::absurd_extreme_comparisons)]
32654        #[allow(unused_comparisons)]
32655        if __tmp.remaining() < Self::ENCODED_LEN {
32656            panic!(
32657                "buffer is too small (need {} bytes, but got {})",
32658                Self::ENCODED_LEN,
32659                __tmp.remaining(),
32660            )
32661        }
32662        __tmp.put_u64_le(self.time_usec);
32663        __tmp.put_u32_le(self.uptime_sec);
32664        __tmp.put_u16_le(self.vendor_specific_status_code);
32665        __tmp.put_u8(self.health as u8);
32666        __tmp.put_u8(self.mode as u8);
32667        __tmp.put_u8(self.sub_mode);
32668        if matches!(version, MavlinkVersion::V2) {
32669            let len = __tmp.len();
32670            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32671        } else {
32672            __tmp.len()
32673        }
32674    }
32675}
32676#[doc = "The global position resulting from GPS and sensor fusion."]
32677#[doc = ""]
32678#[doc = "ID: 340"]
32679#[derive(Debug, Clone, PartialEq)]
32680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32682#[cfg_attr(feature = "ts", derive(TS))]
32683#[cfg_attr(feature = "ts", ts(export))]
32684pub struct UTM_GLOBAL_POSITION_DATA {
32685    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
32686    pub time: u64,
32687    #[doc = "Latitude (WGS84)"]
32688    pub lat: i32,
32689    #[doc = "Longitude (WGS84)"]
32690    pub lon: i32,
32691    #[doc = "Altitude (WGS84)"]
32692    pub alt: i32,
32693    #[doc = "Altitude above ground"]
32694    pub relative_alt: i32,
32695    #[doc = "Next waypoint, latitude (WGS84)"]
32696    pub next_lat: i32,
32697    #[doc = "Next waypoint, longitude (WGS84)"]
32698    pub next_lon: i32,
32699    #[doc = "Next waypoint, altitude (WGS84)"]
32700    pub next_alt: i32,
32701    #[doc = "Ground X speed (latitude, positive north)"]
32702    pub vx: i16,
32703    #[doc = "Ground Y speed (longitude, positive east)"]
32704    pub vy: i16,
32705    #[doc = "Ground Z speed (altitude, positive down)"]
32706    pub vz: i16,
32707    #[doc = "Horizontal position uncertainty (standard deviation)"]
32708    pub h_acc: u16,
32709    #[doc = "Altitude uncertainty (standard deviation)"]
32710    pub v_acc: u16,
32711    #[doc = "Speed uncertainty (standard deviation)"]
32712    pub vel_acc: u16,
32713    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
32714    pub update_rate: u16,
32715    #[doc = "Unique UAS ID."]
32716    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32717    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32718    pub uas_id: [u8; 18],
32719    #[doc = "Flight state"]
32720    pub flight_state: UtmFlightState,
32721    #[doc = "Bitwise OR combination of the data available flags."]
32722    pub flags: UtmDataAvailFlags,
32723}
32724impl UTM_GLOBAL_POSITION_DATA {
32725    pub const ENCODED_LEN: usize = 70usize;
32726    pub const DEFAULT: Self = Self {
32727        time: 0_u64,
32728        lat: 0_i32,
32729        lon: 0_i32,
32730        alt: 0_i32,
32731        relative_alt: 0_i32,
32732        next_lat: 0_i32,
32733        next_lon: 0_i32,
32734        next_alt: 0_i32,
32735        vx: 0_i16,
32736        vy: 0_i16,
32737        vz: 0_i16,
32738        h_acc: 0_u16,
32739        v_acc: 0_u16,
32740        vel_acc: 0_u16,
32741        update_rate: 0_u16,
32742        uas_id: [0_u8; 18usize],
32743        flight_state: UtmFlightState::DEFAULT,
32744        flags: UtmDataAvailFlags::DEFAULT,
32745    };
32746    #[cfg(feature = "arbitrary")]
32747    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32748        use arbitrary::{Arbitrary, Unstructured};
32749        let mut buf = [0u8; 1024];
32750        rng.fill_bytes(&mut buf);
32751        let mut unstructured = Unstructured::new(&buf);
32752        Self::arbitrary(&mut unstructured).unwrap_or_default()
32753    }
32754}
32755impl Default for UTM_GLOBAL_POSITION_DATA {
32756    fn default() -> Self {
32757        Self::DEFAULT.clone()
32758    }
32759}
32760impl MessageData for UTM_GLOBAL_POSITION_DATA {
32761    type Message = MavMessage;
32762    const ID: u32 = 340u32;
32763    const NAME: &'static str = "UTM_GLOBAL_POSITION";
32764    const EXTRA_CRC: u8 = 99u8;
32765    const ENCODED_LEN: usize = 70usize;
32766    fn deser(
32767        _version: MavlinkVersion,
32768        __input: &[u8],
32769    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32770        let avail_len = __input.len();
32771        let mut payload_buf = [0; Self::ENCODED_LEN];
32772        let mut buf = if avail_len < Self::ENCODED_LEN {
32773            payload_buf[0..avail_len].copy_from_slice(__input);
32774            Bytes::new(&payload_buf)
32775        } else {
32776            Bytes::new(__input)
32777        };
32778        let mut __struct = Self::default();
32779        __struct.time = buf.get_u64_le()?;
32780        __struct.lat = buf.get_i32_le()?;
32781        __struct.lon = buf.get_i32_le()?;
32782        __struct.alt = buf.get_i32_le()?;
32783        __struct.relative_alt = buf.get_i32_le()?;
32784        __struct.next_lat = buf.get_i32_le()?;
32785        __struct.next_lon = buf.get_i32_le()?;
32786        __struct.next_alt = buf.get_i32_le()?;
32787        __struct.vx = buf.get_i16_le()?;
32788        __struct.vy = buf.get_i16_le()?;
32789        __struct.vz = buf.get_i16_le()?;
32790        __struct.h_acc = buf.get_u16_le()?;
32791        __struct.v_acc = buf.get_u16_le()?;
32792        __struct.vel_acc = buf.get_u16_le()?;
32793        __struct.update_rate = buf.get_u16_le()?;
32794        for v in &mut __struct.uas_id {
32795            let val = buf.get_u8()?;
32796            *v = val;
32797        }
32798        let tmp = buf.get_u8()?;
32799        __struct.flight_state =
32800            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32801                enum_type: "UtmFlightState",
32802                value: tmp as u64,
32803            })?;
32804        let tmp = buf.get_u8()?;
32805        __struct.flags = UtmDataAvailFlags::from_bits(tmp as <UtmDataAvailFlags as Flags>::Bits)
32806            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32807                flag_type: "UtmDataAvailFlags",
32808                value: tmp as u64,
32809            })?;
32810        Ok(__struct)
32811    }
32812    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32813        let mut __tmp = BytesMut::new(bytes);
32814        #[allow(clippy::absurd_extreme_comparisons)]
32815        #[allow(unused_comparisons)]
32816        if __tmp.remaining() < Self::ENCODED_LEN {
32817            panic!(
32818                "buffer is too small (need {} bytes, but got {})",
32819                Self::ENCODED_LEN,
32820                __tmp.remaining(),
32821            )
32822        }
32823        __tmp.put_u64_le(self.time);
32824        __tmp.put_i32_le(self.lat);
32825        __tmp.put_i32_le(self.lon);
32826        __tmp.put_i32_le(self.alt);
32827        __tmp.put_i32_le(self.relative_alt);
32828        __tmp.put_i32_le(self.next_lat);
32829        __tmp.put_i32_le(self.next_lon);
32830        __tmp.put_i32_le(self.next_alt);
32831        __tmp.put_i16_le(self.vx);
32832        __tmp.put_i16_le(self.vy);
32833        __tmp.put_i16_le(self.vz);
32834        __tmp.put_u16_le(self.h_acc);
32835        __tmp.put_u16_le(self.v_acc);
32836        __tmp.put_u16_le(self.vel_acc);
32837        __tmp.put_u16_le(self.update_rate);
32838        for val in &self.uas_id {
32839            __tmp.put_u8(*val);
32840        }
32841        __tmp.put_u8(self.flight_state as u8);
32842        __tmp.put_u8(self.flags.bits() as u8);
32843        if matches!(version, MavlinkVersion::V2) {
32844            let len = __tmp.len();
32845            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32846        } else {
32847            __tmp.len()
32848        }
32849    }
32850}
32851#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
32852#[doc = ""]
32853#[doc = "ID: 248"]
32854#[derive(Debug, Clone, PartialEq)]
32855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32857#[cfg_attr(feature = "ts", derive(TS))]
32858#[cfg_attr(feature = "ts", ts(export))]
32859pub struct V2_EXTENSION_DATA {
32860    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32861    pub message_type: u16,
32862    #[doc = "Network ID (0 for broadcast)"]
32863    pub target_network: u8,
32864    #[doc = "System ID (0 for broadcast)"]
32865    pub target_system: u8,
32866    #[doc = "Component ID (0 for broadcast)"]
32867    pub target_component: u8,
32868    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
32869    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32870    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32871    pub payload: [u8; 249],
32872}
32873impl V2_EXTENSION_DATA {
32874    pub const ENCODED_LEN: usize = 254usize;
32875    pub const DEFAULT: Self = Self {
32876        message_type: 0_u16,
32877        target_network: 0_u8,
32878        target_system: 0_u8,
32879        target_component: 0_u8,
32880        payload: [0_u8; 249usize],
32881    };
32882    #[cfg(feature = "arbitrary")]
32883    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32884        use arbitrary::{Arbitrary, Unstructured};
32885        let mut buf = [0u8; 1024];
32886        rng.fill_bytes(&mut buf);
32887        let mut unstructured = Unstructured::new(&buf);
32888        Self::arbitrary(&mut unstructured).unwrap_or_default()
32889    }
32890}
32891impl Default for V2_EXTENSION_DATA {
32892    fn default() -> Self {
32893        Self::DEFAULT.clone()
32894    }
32895}
32896impl MessageData for V2_EXTENSION_DATA {
32897    type Message = MavMessage;
32898    const ID: u32 = 248u32;
32899    const NAME: &'static str = "V2_EXTENSION";
32900    const EXTRA_CRC: u8 = 8u8;
32901    const ENCODED_LEN: usize = 254usize;
32902    fn deser(
32903        _version: MavlinkVersion,
32904        __input: &[u8],
32905    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32906        let avail_len = __input.len();
32907        let mut payload_buf = [0; Self::ENCODED_LEN];
32908        let mut buf = if avail_len < Self::ENCODED_LEN {
32909            payload_buf[0..avail_len].copy_from_slice(__input);
32910            Bytes::new(&payload_buf)
32911        } else {
32912            Bytes::new(__input)
32913        };
32914        let mut __struct = Self::default();
32915        __struct.message_type = buf.get_u16_le()?;
32916        __struct.target_network = buf.get_u8()?;
32917        __struct.target_system = buf.get_u8()?;
32918        __struct.target_component = buf.get_u8()?;
32919        for v in &mut __struct.payload {
32920            let val = buf.get_u8()?;
32921            *v = val;
32922        }
32923        Ok(__struct)
32924    }
32925    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32926        let mut __tmp = BytesMut::new(bytes);
32927        #[allow(clippy::absurd_extreme_comparisons)]
32928        #[allow(unused_comparisons)]
32929        if __tmp.remaining() < Self::ENCODED_LEN {
32930            panic!(
32931                "buffer is too small (need {} bytes, but got {})",
32932                Self::ENCODED_LEN,
32933                __tmp.remaining(),
32934            )
32935        }
32936        __tmp.put_u16_le(self.message_type);
32937        __tmp.put_u8(self.target_network);
32938        __tmp.put_u8(self.target_system);
32939        __tmp.put_u8(self.target_component);
32940        for val in &self.payload {
32941            __tmp.put_u8(*val);
32942        }
32943        if matches!(version, MavlinkVersion::V2) {
32944            let len = __tmp.len();
32945            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32946        } else {
32947            __tmp.len()
32948        }
32949    }
32950}
32951#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
32952#[doc = ""]
32953#[doc = "ID: 74"]
32954#[derive(Debug, Clone, PartialEq)]
32955#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32956#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32957#[cfg_attr(feature = "ts", derive(TS))]
32958#[cfg_attr(feature = "ts", ts(export))]
32959pub struct VFR_HUD_DATA {
32960    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
32961    pub airspeed: f32,
32962    #[doc = "Current ground speed."]
32963    pub groundspeed: f32,
32964    #[doc = "Current altitude (MSL)."]
32965    pub alt: f32,
32966    #[doc = "Current climb rate."]
32967    pub climb: f32,
32968    #[doc = "Current heading in compass units (0-360, 0=north)."]
32969    pub heading: i16,
32970    #[doc = "Current throttle setting (0 to 100)."]
32971    pub throttle: u16,
32972}
32973impl VFR_HUD_DATA {
32974    pub const ENCODED_LEN: usize = 20usize;
32975    pub const DEFAULT: Self = Self {
32976        airspeed: 0.0_f32,
32977        groundspeed: 0.0_f32,
32978        alt: 0.0_f32,
32979        climb: 0.0_f32,
32980        heading: 0_i16,
32981        throttle: 0_u16,
32982    };
32983    #[cfg(feature = "arbitrary")]
32984    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32985        use arbitrary::{Arbitrary, Unstructured};
32986        let mut buf = [0u8; 1024];
32987        rng.fill_bytes(&mut buf);
32988        let mut unstructured = Unstructured::new(&buf);
32989        Self::arbitrary(&mut unstructured).unwrap_or_default()
32990    }
32991}
32992impl Default for VFR_HUD_DATA {
32993    fn default() -> Self {
32994        Self::DEFAULT.clone()
32995    }
32996}
32997impl MessageData for VFR_HUD_DATA {
32998    type Message = MavMessage;
32999    const ID: u32 = 74u32;
33000    const NAME: &'static str = "VFR_HUD";
33001    const EXTRA_CRC: u8 = 20u8;
33002    const ENCODED_LEN: usize = 20usize;
33003    fn deser(
33004        _version: MavlinkVersion,
33005        __input: &[u8],
33006    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33007        let avail_len = __input.len();
33008        let mut payload_buf = [0; Self::ENCODED_LEN];
33009        let mut buf = if avail_len < Self::ENCODED_LEN {
33010            payload_buf[0..avail_len].copy_from_slice(__input);
33011            Bytes::new(&payload_buf)
33012        } else {
33013            Bytes::new(__input)
33014        };
33015        let mut __struct = Self::default();
33016        __struct.airspeed = buf.get_f32_le()?;
33017        __struct.groundspeed = buf.get_f32_le()?;
33018        __struct.alt = buf.get_f32_le()?;
33019        __struct.climb = buf.get_f32_le()?;
33020        __struct.heading = buf.get_i16_le()?;
33021        __struct.throttle = buf.get_u16_le()?;
33022        Ok(__struct)
33023    }
33024    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33025        let mut __tmp = BytesMut::new(bytes);
33026        #[allow(clippy::absurd_extreme_comparisons)]
33027        #[allow(unused_comparisons)]
33028        if __tmp.remaining() < Self::ENCODED_LEN {
33029            panic!(
33030                "buffer is too small (need {} bytes, but got {})",
33031                Self::ENCODED_LEN,
33032                __tmp.remaining(),
33033            )
33034        }
33035        __tmp.put_f32_le(self.airspeed);
33036        __tmp.put_f32_le(self.groundspeed);
33037        __tmp.put_f32_le(self.alt);
33038        __tmp.put_f32_le(self.climb);
33039        __tmp.put_i16_le(self.heading);
33040        __tmp.put_u16_le(self.throttle);
33041        if matches!(version, MavlinkVersion::V2) {
33042            let len = __tmp.len();
33043            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33044        } else {
33045            __tmp.len()
33046        }
33047    }
33048}
33049#[doc = "Vibration levels and accelerometer clipping."]
33050#[doc = ""]
33051#[doc = "ID: 241"]
33052#[derive(Debug, Clone, PartialEq)]
33053#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33054#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33055#[cfg_attr(feature = "ts", derive(TS))]
33056#[cfg_attr(feature = "ts", ts(export))]
33057pub struct VIBRATION_DATA {
33058    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33059    pub time_usec: u64,
33060    #[doc = "Vibration levels on X-axis"]
33061    pub vibration_x: f32,
33062    #[doc = "Vibration levels on Y-axis"]
33063    pub vibration_y: f32,
33064    #[doc = "Vibration levels on Z-axis"]
33065    pub vibration_z: f32,
33066    #[doc = "first accelerometer clipping count"]
33067    pub clipping_0: u32,
33068    #[doc = "second accelerometer clipping count"]
33069    pub clipping_1: u32,
33070    #[doc = "third accelerometer clipping count"]
33071    pub clipping_2: u32,
33072}
33073impl VIBRATION_DATA {
33074    pub const ENCODED_LEN: usize = 32usize;
33075    pub const DEFAULT: Self = Self {
33076        time_usec: 0_u64,
33077        vibration_x: 0.0_f32,
33078        vibration_y: 0.0_f32,
33079        vibration_z: 0.0_f32,
33080        clipping_0: 0_u32,
33081        clipping_1: 0_u32,
33082        clipping_2: 0_u32,
33083    };
33084    #[cfg(feature = "arbitrary")]
33085    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33086        use arbitrary::{Arbitrary, Unstructured};
33087        let mut buf = [0u8; 1024];
33088        rng.fill_bytes(&mut buf);
33089        let mut unstructured = Unstructured::new(&buf);
33090        Self::arbitrary(&mut unstructured).unwrap_or_default()
33091    }
33092}
33093impl Default for VIBRATION_DATA {
33094    fn default() -> Self {
33095        Self::DEFAULT.clone()
33096    }
33097}
33098impl MessageData for VIBRATION_DATA {
33099    type Message = MavMessage;
33100    const ID: u32 = 241u32;
33101    const NAME: &'static str = "VIBRATION";
33102    const EXTRA_CRC: u8 = 90u8;
33103    const ENCODED_LEN: usize = 32usize;
33104    fn deser(
33105        _version: MavlinkVersion,
33106        __input: &[u8],
33107    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33108        let avail_len = __input.len();
33109        let mut payload_buf = [0; Self::ENCODED_LEN];
33110        let mut buf = if avail_len < Self::ENCODED_LEN {
33111            payload_buf[0..avail_len].copy_from_slice(__input);
33112            Bytes::new(&payload_buf)
33113        } else {
33114            Bytes::new(__input)
33115        };
33116        let mut __struct = Self::default();
33117        __struct.time_usec = buf.get_u64_le()?;
33118        __struct.vibration_x = buf.get_f32_le()?;
33119        __struct.vibration_y = buf.get_f32_le()?;
33120        __struct.vibration_z = buf.get_f32_le()?;
33121        __struct.clipping_0 = buf.get_u32_le()?;
33122        __struct.clipping_1 = buf.get_u32_le()?;
33123        __struct.clipping_2 = buf.get_u32_le()?;
33124        Ok(__struct)
33125    }
33126    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33127        let mut __tmp = BytesMut::new(bytes);
33128        #[allow(clippy::absurd_extreme_comparisons)]
33129        #[allow(unused_comparisons)]
33130        if __tmp.remaining() < Self::ENCODED_LEN {
33131            panic!(
33132                "buffer is too small (need {} bytes, but got {})",
33133                Self::ENCODED_LEN,
33134                __tmp.remaining(),
33135            )
33136        }
33137        __tmp.put_u64_le(self.time_usec);
33138        __tmp.put_f32_le(self.vibration_x);
33139        __tmp.put_f32_le(self.vibration_y);
33140        __tmp.put_f32_le(self.vibration_z);
33141        __tmp.put_u32_le(self.clipping_0);
33142        __tmp.put_u32_le(self.clipping_1);
33143        __tmp.put_u32_le(self.clipping_2);
33144        if matches!(version, MavlinkVersion::V2) {
33145            let len = __tmp.len();
33146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33147        } else {
33148            __tmp.len()
33149        }
33150    }
33151}
33152#[doc = "Global position estimate from a Vicon motion system source."]
33153#[doc = ""]
33154#[doc = "ID: 104"]
33155#[derive(Debug, Clone, PartialEq)]
33156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33158#[cfg_attr(feature = "ts", derive(TS))]
33159#[cfg_attr(feature = "ts", ts(export))]
33160pub struct VICON_POSITION_ESTIMATE_DATA {
33161    #[doc = "Timestamp (UNIX time or time since system boot)"]
33162    pub usec: u64,
33163    #[doc = "Global X position"]
33164    pub x: f32,
33165    #[doc = "Global Y position"]
33166    pub y: f32,
33167    #[doc = "Global Z position"]
33168    pub z: f32,
33169    #[doc = "Roll angle"]
33170    pub roll: f32,
33171    #[doc = "Pitch angle"]
33172    pub pitch: f32,
33173    #[doc = "Yaw angle"]
33174    pub yaw: f32,
33175    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33176    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33177    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33178    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33179    pub covariance: [f32; 21],
33180}
33181impl VICON_POSITION_ESTIMATE_DATA {
33182    pub const ENCODED_LEN: usize = 116usize;
33183    pub const DEFAULT: Self = Self {
33184        usec: 0_u64,
33185        x: 0.0_f32,
33186        y: 0.0_f32,
33187        z: 0.0_f32,
33188        roll: 0.0_f32,
33189        pitch: 0.0_f32,
33190        yaw: 0.0_f32,
33191        covariance: [0.0_f32; 21usize],
33192    };
33193    #[cfg(feature = "arbitrary")]
33194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33195        use arbitrary::{Arbitrary, Unstructured};
33196        let mut buf = [0u8; 1024];
33197        rng.fill_bytes(&mut buf);
33198        let mut unstructured = Unstructured::new(&buf);
33199        Self::arbitrary(&mut unstructured).unwrap_or_default()
33200    }
33201}
33202impl Default for VICON_POSITION_ESTIMATE_DATA {
33203    fn default() -> Self {
33204        Self::DEFAULT.clone()
33205    }
33206}
33207impl MessageData for VICON_POSITION_ESTIMATE_DATA {
33208    type Message = MavMessage;
33209    const ID: u32 = 104u32;
33210    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
33211    const EXTRA_CRC: u8 = 56u8;
33212    const ENCODED_LEN: usize = 116usize;
33213    fn deser(
33214        _version: MavlinkVersion,
33215        __input: &[u8],
33216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33217        let avail_len = __input.len();
33218        let mut payload_buf = [0; Self::ENCODED_LEN];
33219        let mut buf = if avail_len < Self::ENCODED_LEN {
33220            payload_buf[0..avail_len].copy_from_slice(__input);
33221            Bytes::new(&payload_buf)
33222        } else {
33223            Bytes::new(__input)
33224        };
33225        let mut __struct = Self::default();
33226        __struct.usec = buf.get_u64_le()?;
33227        __struct.x = buf.get_f32_le()?;
33228        __struct.y = buf.get_f32_le()?;
33229        __struct.z = buf.get_f32_le()?;
33230        __struct.roll = buf.get_f32_le()?;
33231        __struct.pitch = buf.get_f32_le()?;
33232        __struct.yaw = buf.get_f32_le()?;
33233        for v in &mut __struct.covariance {
33234            let val = buf.get_f32_le()?;
33235            *v = val;
33236        }
33237        Ok(__struct)
33238    }
33239    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33240        let mut __tmp = BytesMut::new(bytes);
33241        #[allow(clippy::absurd_extreme_comparisons)]
33242        #[allow(unused_comparisons)]
33243        if __tmp.remaining() < Self::ENCODED_LEN {
33244            panic!(
33245                "buffer is too small (need {} bytes, but got {})",
33246                Self::ENCODED_LEN,
33247                __tmp.remaining(),
33248            )
33249        }
33250        __tmp.put_u64_le(self.usec);
33251        __tmp.put_f32_le(self.x);
33252        __tmp.put_f32_le(self.y);
33253        __tmp.put_f32_le(self.z);
33254        __tmp.put_f32_le(self.roll);
33255        __tmp.put_f32_le(self.pitch);
33256        __tmp.put_f32_le(self.yaw);
33257        if matches!(version, MavlinkVersion::V2) {
33258            for val in &self.covariance {
33259                __tmp.put_f32_le(*val);
33260            }
33261            let len = __tmp.len();
33262            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33263        } else {
33264            __tmp.len()
33265        }
33266    }
33267}
33268#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33269#[doc = ""]
33270#[doc = "ID: 269"]
33271#[derive(Debug, Clone, PartialEq)]
33272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33274#[cfg_attr(feature = "ts", derive(TS))]
33275#[cfg_attr(feature = "ts", ts(export))]
33276pub struct VIDEO_STREAM_INFORMATION_DATA {
33277    #[doc = "Frame rate."]
33278    pub framerate: f32,
33279    #[doc = "Bit rate."]
33280    pub bitrate: u32,
33281    #[doc = "Bitmap of stream status flags."]
33282    pub flags: VideoStreamStatusFlags,
33283    #[doc = "Horizontal resolution."]
33284    pub resolution_h: u16,
33285    #[doc = "Vertical resolution."]
33286    pub resolution_v: u16,
33287    #[doc = "Video image rotation clockwise."]
33288    pub rotation: u16,
33289    #[doc = "Horizontal Field of view."]
33290    pub hfov: u16,
33291    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33292    pub stream_id: u8,
33293    #[doc = "Number of streams available."]
33294    pub count: u8,
33295    #[doc = "Type of stream."]
33296    pub mavtype: VideoStreamType,
33297    #[doc = "Stream name."]
33298    #[cfg_attr(feature = "ts", ts(type = "string"))]
33299    pub name: CharArray<32>,
33300    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
33301    #[cfg_attr(feature = "ts", ts(type = "string"))]
33302    pub uri: CharArray<160>,
33303    #[doc = "Encoding of stream."]
33304    #[cfg_attr(feature = "serde", serde(default))]
33305    pub encoding: VideoStreamEncoding,
33306    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
33307    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33308    pub camera_device_id: u8,
33309}
33310impl VIDEO_STREAM_INFORMATION_DATA {
33311    pub const ENCODED_LEN: usize = 215usize;
33312    pub const DEFAULT: Self = Self {
33313        framerate: 0.0_f32,
33314        bitrate: 0_u32,
33315        flags: VideoStreamStatusFlags::DEFAULT,
33316        resolution_h: 0_u16,
33317        resolution_v: 0_u16,
33318        rotation: 0_u16,
33319        hfov: 0_u16,
33320        stream_id: 0_u8,
33321        count: 0_u8,
33322        mavtype: VideoStreamType::DEFAULT,
33323        name: CharArray::new([0_u8; 32usize]),
33324        uri: CharArray::new([0_u8; 160usize]),
33325        encoding: VideoStreamEncoding::DEFAULT,
33326        camera_device_id: 0_u8,
33327    };
33328    #[cfg(feature = "arbitrary")]
33329    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33330        use arbitrary::{Arbitrary, Unstructured};
33331        let mut buf = [0u8; 1024];
33332        rng.fill_bytes(&mut buf);
33333        let mut unstructured = Unstructured::new(&buf);
33334        Self::arbitrary(&mut unstructured).unwrap_or_default()
33335    }
33336}
33337impl Default for VIDEO_STREAM_INFORMATION_DATA {
33338    fn default() -> Self {
33339        Self::DEFAULT.clone()
33340    }
33341}
33342impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
33343    type Message = MavMessage;
33344    const ID: u32 = 269u32;
33345    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
33346    const EXTRA_CRC: u8 = 109u8;
33347    const ENCODED_LEN: usize = 215usize;
33348    fn deser(
33349        _version: MavlinkVersion,
33350        __input: &[u8],
33351    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33352        let avail_len = __input.len();
33353        let mut payload_buf = [0; Self::ENCODED_LEN];
33354        let mut buf = if avail_len < Self::ENCODED_LEN {
33355            payload_buf[0..avail_len].copy_from_slice(__input);
33356            Bytes::new(&payload_buf)
33357        } else {
33358            Bytes::new(__input)
33359        };
33360        let mut __struct = Self::default();
33361        __struct.framerate = buf.get_f32_le()?;
33362        __struct.bitrate = buf.get_u32_le()?;
33363        let tmp = buf.get_u16_le()?;
33364        __struct.flags =
33365            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
33366                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33367                    flag_type: "VideoStreamStatusFlags",
33368                    value: tmp as u64,
33369                })?;
33370        __struct.resolution_h = buf.get_u16_le()?;
33371        __struct.resolution_v = buf.get_u16_le()?;
33372        __struct.rotation = buf.get_u16_le()?;
33373        __struct.hfov = buf.get_u16_le()?;
33374        __struct.stream_id = buf.get_u8()?;
33375        __struct.count = buf.get_u8()?;
33376        let tmp = buf.get_u8()?;
33377        __struct.mavtype =
33378            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33379                enum_type: "VideoStreamType",
33380                value: tmp as u64,
33381            })?;
33382        let mut tmp = [0_u8; 32usize];
33383        for v in &mut tmp {
33384            *v = buf.get_u8()?;
33385        }
33386        __struct.name = CharArray::new(tmp);
33387        let mut tmp = [0_u8; 160usize];
33388        for v in &mut tmp {
33389            *v = buf.get_u8()?;
33390        }
33391        __struct.uri = CharArray::new(tmp);
33392        let tmp = buf.get_u8()?;
33393        __struct.encoding =
33394            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33395                enum_type: "VideoStreamEncoding",
33396                value: tmp as u64,
33397            })?;
33398        __struct.camera_device_id = buf.get_u8()?;
33399        Ok(__struct)
33400    }
33401    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33402        let mut __tmp = BytesMut::new(bytes);
33403        #[allow(clippy::absurd_extreme_comparisons)]
33404        #[allow(unused_comparisons)]
33405        if __tmp.remaining() < Self::ENCODED_LEN {
33406            panic!(
33407                "buffer is too small (need {} bytes, but got {})",
33408                Self::ENCODED_LEN,
33409                __tmp.remaining(),
33410            )
33411        }
33412        __tmp.put_f32_le(self.framerate);
33413        __tmp.put_u32_le(self.bitrate);
33414        __tmp.put_u16_le(self.flags.bits() as u16);
33415        __tmp.put_u16_le(self.resolution_h);
33416        __tmp.put_u16_le(self.resolution_v);
33417        __tmp.put_u16_le(self.rotation);
33418        __tmp.put_u16_le(self.hfov);
33419        __tmp.put_u8(self.stream_id);
33420        __tmp.put_u8(self.count);
33421        __tmp.put_u8(self.mavtype as u8);
33422        for val in &self.name {
33423            __tmp.put_u8(*val);
33424        }
33425        for val in &self.uri {
33426            __tmp.put_u8(*val);
33427        }
33428        if matches!(version, MavlinkVersion::V2) {
33429            __tmp.put_u8(self.encoding as u8);
33430            __tmp.put_u8(self.camera_device_id);
33431            let len = __tmp.len();
33432            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33433        } else {
33434            __tmp.len()
33435        }
33436    }
33437}
33438#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33439#[doc = ""]
33440#[doc = "ID: 270"]
33441#[derive(Debug, Clone, PartialEq)]
33442#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33443#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33444#[cfg_attr(feature = "ts", derive(TS))]
33445#[cfg_attr(feature = "ts", ts(export))]
33446pub struct VIDEO_STREAM_STATUS_DATA {
33447    #[doc = "Frame rate"]
33448    pub framerate: f32,
33449    #[doc = "Bit rate"]
33450    pub bitrate: u32,
33451    #[doc = "Bitmap of stream status flags"]
33452    pub flags: VideoStreamStatusFlags,
33453    #[doc = "Horizontal resolution"]
33454    pub resolution_h: u16,
33455    #[doc = "Vertical resolution"]
33456    pub resolution_v: u16,
33457    #[doc = "Video image rotation clockwise"]
33458    pub rotation: u16,
33459    #[doc = "Horizontal Field of view"]
33460    pub hfov: u16,
33461    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33462    pub stream_id: u8,
33463    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
33464    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33465    pub camera_device_id: u8,
33466}
33467impl VIDEO_STREAM_STATUS_DATA {
33468    pub const ENCODED_LEN: usize = 20usize;
33469    pub const DEFAULT: Self = Self {
33470        framerate: 0.0_f32,
33471        bitrate: 0_u32,
33472        flags: VideoStreamStatusFlags::DEFAULT,
33473        resolution_h: 0_u16,
33474        resolution_v: 0_u16,
33475        rotation: 0_u16,
33476        hfov: 0_u16,
33477        stream_id: 0_u8,
33478        camera_device_id: 0_u8,
33479    };
33480    #[cfg(feature = "arbitrary")]
33481    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33482        use arbitrary::{Arbitrary, Unstructured};
33483        let mut buf = [0u8; 1024];
33484        rng.fill_bytes(&mut buf);
33485        let mut unstructured = Unstructured::new(&buf);
33486        Self::arbitrary(&mut unstructured).unwrap_or_default()
33487    }
33488}
33489impl Default for VIDEO_STREAM_STATUS_DATA {
33490    fn default() -> Self {
33491        Self::DEFAULT.clone()
33492    }
33493}
33494impl MessageData for VIDEO_STREAM_STATUS_DATA {
33495    type Message = MavMessage;
33496    const ID: u32 = 270u32;
33497    const NAME: &'static str = "VIDEO_STREAM_STATUS";
33498    const EXTRA_CRC: u8 = 59u8;
33499    const ENCODED_LEN: usize = 20usize;
33500    fn deser(
33501        _version: MavlinkVersion,
33502        __input: &[u8],
33503    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33504        let avail_len = __input.len();
33505        let mut payload_buf = [0; Self::ENCODED_LEN];
33506        let mut buf = if avail_len < Self::ENCODED_LEN {
33507            payload_buf[0..avail_len].copy_from_slice(__input);
33508            Bytes::new(&payload_buf)
33509        } else {
33510            Bytes::new(__input)
33511        };
33512        let mut __struct = Self::default();
33513        __struct.framerate = buf.get_f32_le()?;
33514        __struct.bitrate = buf.get_u32_le()?;
33515        let tmp = buf.get_u16_le()?;
33516        __struct.flags =
33517            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
33518                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33519                    flag_type: "VideoStreamStatusFlags",
33520                    value: tmp as u64,
33521                })?;
33522        __struct.resolution_h = buf.get_u16_le()?;
33523        __struct.resolution_v = buf.get_u16_le()?;
33524        __struct.rotation = buf.get_u16_le()?;
33525        __struct.hfov = buf.get_u16_le()?;
33526        __struct.stream_id = buf.get_u8()?;
33527        __struct.camera_device_id = buf.get_u8()?;
33528        Ok(__struct)
33529    }
33530    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33531        let mut __tmp = BytesMut::new(bytes);
33532        #[allow(clippy::absurd_extreme_comparisons)]
33533        #[allow(unused_comparisons)]
33534        if __tmp.remaining() < Self::ENCODED_LEN {
33535            panic!(
33536                "buffer is too small (need {} bytes, but got {})",
33537                Self::ENCODED_LEN,
33538                __tmp.remaining(),
33539            )
33540        }
33541        __tmp.put_f32_le(self.framerate);
33542        __tmp.put_u32_le(self.bitrate);
33543        __tmp.put_u16_le(self.flags.bits() as u16);
33544        __tmp.put_u16_le(self.resolution_h);
33545        __tmp.put_u16_le(self.resolution_v);
33546        __tmp.put_u16_le(self.rotation);
33547        __tmp.put_u16_le(self.hfov);
33548        __tmp.put_u8(self.stream_id);
33549        if matches!(version, MavlinkVersion::V2) {
33550            __tmp.put_u8(self.camera_device_id);
33551            let len = __tmp.len();
33552            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33553        } else {
33554            __tmp.len()
33555        }
33556    }
33557}
33558#[doc = "Local position/attitude estimate from a vision source."]
33559#[doc = ""]
33560#[doc = "ID: 102"]
33561#[derive(Debug, Clone, PartialEq)]
33562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33564#[cfg_attr(feature = "ts", derive(TS))]
33565#[cfg_attr(feature = "ts", ts(export))]
33566pub struct VISION_POSITION_ESTIMATE_DATA {
33567    #[doc = "Timestamp (UNIX time or time since system boot)"]
33568    pub usec: u64,
33569    #[doc = "Local X position"]
33570    pub x: f32,
33571    #[doc = "Local Y position"]
33572    pub y: f32,
33573    #[doc = "Local Z position"]
33574    pub z: f32,
33575    #[doc = "Roll angle"]
33576    pub roll: f32,
33577    #[doc = "Pitch angle"]
33578    pub pitch: f32,
33579    #[doc = "Yaw angle"]
33580    pub yaw: f32,
33581    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33582    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33583    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33584    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33585    pub covariance: [f32; 21],
33586    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33587    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33588    pub reset_counter: u8,
33589}
33590impl VISION_POSITION_ESTIMATE_DATA {
33591    pub const ENCODED_LEN: usize = 117usize;
33592    pub const DEFAULT: Self = Self {
33593        usec: 0_u64,
33594        x: 0.0_f32,
33595        y: 0.0_f32,
33596        z: 0.0_f32,
33597        roll: 0.0_f32,
33598        pitch: 0.0_f32,
33599        yaw: 0.0_f32,
33600        covariance: [0.0_f32; 21usize],
33601        reset_counter: 0_u8,
33602    };
33603    #[cfg(feature = "arbitrary")]
33604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33605        use arbitrary::{Arbitrary, Unstructured};
33606        let mut buf = [0u8; 1024];
33607        rng.fill_bytes(&mut buf);
33608        let mut unstructured = Unstructured::new(&buf);
33609        Self::arbitrary(&mut unstructured).unwrap_or_default()
33610    }
33611}
33612impl Default for VISION_POSITION_ESTIMATE_DATA {
33613    fn default() -> Self {
33614        Self::DEFAULT.clone()
33615    }
33616}
33617impl MessageData for VISION_POSITION_ESTIMATE_DATA {
33618    type Message = MavMessage;
33619    const ID: u32 = 102u32;
33620    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
33621    const EXTRA_CRC: u8 = 158u8;
33622    const ENCODED_LEN: usize = 117usize;
33623    fn deser(
33624        _version: MavlinkVersion,
33625        __input: &[u8],
33626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33627        let avail_len = __input.len();
33628        let mut payload_buf = [0; Self::ENCODED_LEN];
33629        let mut buf = if avail_len < Self::ENCODED_LEN {
33630            payload_buf[0..avail_len].copy_from_slice(__input);
33631            Bytes::new(&payload_buf)
33632        } else {
33633            Bytes::new(__input)
33634        };
33635        let mut __struct = Self::default();
33636        __struct.usec = buf.get_u64_le()?;
33637        __struct.x = buf.get_f32_le()?;
33638        __struct.y = buf.get_f32_le()?;
33639        __struct.z = buf.get_f32_le()?;
33640        __struct.roll = buf.get_f32_le()?;
33641        __struct.pitch = buf.get_f32_le()?;
33642        __struct.yaw = buf.get_f32_le()?;
33643        for v in &mut __struct.covariance {
33644            let val = buf.get_f32_le()?;
33645            *v = val;
33646        }
33647        __struct.reset_counter = buf.get_u8()?;
33648        Ok(__struct)
33649    }
33650    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33651        let mut __tmp = BytesMut::new(bytes);
33652        #[allow(clippy::absurd_extreme_comparisons)]
33653        #[allow(unused_comparisons)]
33654        if __tmp.remaining() < Self::ENCODED_LEN {
33655            panic!(
33656                "buffer is too small (need {} bytes, but got {})",
33657                Self::ENCODED_LEN,
33658                __tmp.remaining(),
33659            )
33660        }
33661        __tmp.put_u64_le(self.usec);
33662        __tmp.put_f32_le(self.x);
33663        __tmp.put_f32_le(self.y);
33664        __tmp.put_f32_le(self.z);
33665        __tmp.put_f32_le(self.roll);
33666        __tmp.put_f32_le(self.pitch);
33667        __tmp.put_f32_le(self.yaw);
33668        if matches!(version, MavlinkVersion::V2) {
33669            for val in &self.covariance {
33670                __tmp.put_f32_le(*val);
33671            }
33672            __tmp.put_u8(self.reset_counter);
33673            let len = __tmp.len();
33674            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33675        } else {
33676            __tmp.len()
33677        }
33678    }
33679}
33680#[doc = "Speed estimate from a vision source."]
33681#[doc = ""]
33682#[doc = "ID: 103"]
33683#[derive(Debug, Clone, PartialEq)]
33684#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33685#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33686#[cfg_attr(feature = "ts", derive(TS))]
33687#[cfg_attr(feature = "ts", ts(export))]
33688pub struct VISION_SPEED_ESTIMATE_DATA {
33689    #[doc = "Timestamp (UNIX time or time since system boot)"]
33690    pub usec: u64,
33691    #[doc = "Global X speed"]
33692    pub x: f32,
33693    #[doc = "Global Y speed"]
33694    pub y: f32,
33695    #[doc = "Global Z speed"]
33696    pub z: f32,
33697    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
33698    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33699    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33700    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33701    pub covariance: [f32; 9],
33702    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33703    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33704    pub reset_counter: u8,
33705}
33706impl VISION_SPEED_ESTIMATE_DATA {
33707    pub const ENCODED_LEN: usize = 57usize;
33708    pub const DEFAULT: Self = Self {
33709        usec: 0_u64,
33710        x: 0.0_f32,
33711        y: 0.0_f32,
33712        z: 0.0_f32,
33713        covariance: [0.0_f32; 9usize],
33714        reset_counter: 0_u8,
33715    };
33716    #[cfg(feature = "arbitrary")]
33717    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33718        use arbitrary::{Arbitrary, Unstructured};
33719        let mut buf = [0u8; 1024];
33720        rng.fill_bytes(&mut buf);
33721        let mut unstructured = Unstructured::new(&buf);
33722        Self::arbitrary(&mut unstructured).unwrap_or_default()
33723    }
33724}
33725impl Default for VISION_SPEED_ESTIMATE_DATA {
33726    fn default() -> Self {
33727        Self::DEFAULT.clone()
33728    }
33729}
33730impl MessageData for VISION_SPEED_ESTIMATE_DATA {
33731    type Message = MavMessage;
33732    const ID: u32 = 103u32;
33733    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
33734    const EXTRA_CRC: u8 = 208u8;
33735    const ENCODED_LEN: usize = 57usize;
33736    fn deser(
33737        _version: MavlinkVersion,
33738        __input: &[u8],
33739    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33740        let avail_len = __input.len();
33741        let mut payload_buf = [0; Self::ENCODED_LEN];
33742        let mut buf = if avail_len < Self::ENCODED_LEN {
33743            payload_buf[0..avail_len].copy_from_slice(__input);
33744            Bytes::new(&payload_buf)
33745        } else {
33746            Bytes::new(__input)
33747        };
33748        let mut __struct = Self::default();
33749        __struct.usec = buf.get_u64_le()?;
33750        __struct.x = buf.get_f32_le()?;
33751        __struct.y = buf.get_f32_le()?;
33752        __struct.z = buf.get_f32_le()?;
33753        for v in &mut __struct.covariance {
33754            let val = buf.get_f32_le()?;
33755            *v = val;
33756        }
33757        __struct.reset_counter = buf.get_u8()?;
33758        Ok(__struct)
33759    }
33760    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33761        let mut __tmp = BytesMut::new(bytes);
33762        #[allow(clippy::absurd_extreme_comparisons)]
33763        #[allow(unused_comparisons)]
33764        if __tmp.remaining() < Self::ENCODED_LEN {
33765            panic!(
33766                "buffer is too small (need {} bytes, but got {})",
33767                Self::ENCODED_LEN,
33768                __tmp.remaining(),
33769            )
33770        }
33771        __tmp.put_u64_le(self.usec);
33772        __tmp.put_f32_le(self.x);
33773        __tmp.put_f32_le(self.y);
33774        __tmp.put_f32_le(self.z);
33775        if matches!(version, MavlinkVersion::V2) {
33776            for val in &self.covariance {
33777                __tmp.put_f32_le(*val);
33778            }
33779            __tmp.put_u8(self.reset_counter);
33780            let len = __tmp.len();
33781            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33782        } else {
33783            __tmp.len()
33784        }
33785    }
33786}
33787#[doc = "Cumulative distance traveled for each reported wheel."]
33788#[doc = ""]
33789#[doc = "ID: 9000"]
33790#[derive(Debug, Clone, PartialEq)]
33791#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33793#[cfg_attr(feature = "ts", derive(TS))]
33794#[cfg_attr(feature = "ts", ts(export))]
33795pub struct WHEEL_DISTANCE_DATA {
33796    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33797    pub time_usec: u64,
33798    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
33799    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33800    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33801    pub distance: [f64; 16],
33802    #[doc = "Number of wheels reported."]
33803    pub count: u8,
33804}
33805impl WHEEL_DISTANCE_DATA {
33806    pub const ENCODED_LEN: usize = 137usize;
33807    pub const DEFAULT: Self = Self {
33808        time_usec: 0_u64,
33809        distance: [0.0_f64; 16usize],
33810        count: 0_u8,
33811    };
33812    #[cfg(feature = "arbitrary")]
33813    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33814        use arbitrary::{Arbitrary, Unstructured};
33815        let mut buf = [0u8; 1024];
33816        rng.fill_bytes(&mut buf);
33817        let mut unstructured = Unstructured::new(&buf);
33818        Self::arbitrary(&mut unstructured).unwrap_or_default()
33819    }
33820}
33821impl Default for WHEEL_DISTANCE_DATA {
33822    fn default() -> Self {
33823        Self::DEFAULT.clone()
33824    }
33825}
33826impl MessageData for WHEEL_DISTANCE_DATA {
33827    type Message = MavMessage;
33828    const ID: u32 = 9000u32;
33829    const NAME: &'static str = "WHEEL_DISTANCE";
33830    const EXTRA_CRC: u8 = 113u8;
33831    const ENCODED_LEN: usize = 137usize;
33832    fn deser(
33833        _version: MavlinkVersion,
33834        __input: &[u8],
33835    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33836        let avail_len = __input.len();
33837        let mut payload_buf = [0; Self::ENCODED_LEN];
33838        let mut buf = if avail_len < Self::ENCODED_LEN {
33839            payload_buf[0..avail_len].copy_from_slice(__input);
33840            Bytes::new(&payload_buf)
33841        } else {
33842            Bytes::new(__input)
33843        };
33844        let mut __struct = Self::default();
33845        __struct.time_usec = buf.get_u64_le()?;
33846        for v in &mut __struct.distance {
33847            let val = buf.get_f64_le()?;
33848            *v = val;
33849        }
33850        __struct.count = buf.get_u8()?;
33851        Ok(__struct)
33852    }
33853    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33854        let mut __tmp = BytesMut::new(bytes);
33855        #[allow(clippy::absurd_extreme_comparisons)]
33856        #[allow(unused_comparisons)]
33857        if __tmp.remaining() < Self::ENCODED_LEN {
33858            panic!(
33859                "buffer is too small (need {} bytes, but got {})",
33860                Self::ENCODED_LEN,
33861                __tmp.remaining(),
33862            )
33863        }
33864        __tmp.put_u64_le(self.time_usec);
33865        for val in &self.distance {
33866            __tmp.put_f64_le(*val);
33867        }
33868        __tmp.put_u8(self.count);
33869        if matches!(version, MavlinkVersion::V2) {
33870            let len = __tmp.len();
33871            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33872        } else {
33873            __tmp.len()
33874        }
33875    }
33876}
33877#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33878#[doc = ""]
33879#[doc = "ID: 299"]
33880#[derive(Debug, Clone, PartialEq)]
33881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33882#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33883#[cfg_attr(feature = "ts", derive(TS))]
33884#[cfg_attr(feature = "ts", ts(export))]
33885pub struct WIFI_CONFIG_AP_DATA {
33886    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
33887    #[cfg_attr(feature = "ts", ts(type = "string"))]
33888    pub ssid: CharArray<32>,
33889    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
33890    #[cfg_attr(feature = "ts", ts(type = "string"))]
33891    pub password: CharArray<64>,
33892    #[doc = "WiFi Mode."]
33893    #[cfg_attr(feature = "serde", serde(default))]
33894    pub mode: WifiConfigApMode,
33895    #[doc = "Message acceptance response (sent back to GS)."]
33896    #[cfg_attr(feature = "serde", serde(default))]
33897    pub response: WifiConfigApResponse,
33898}
33899impl WIFI_CONFIG_AP_DATA {
33900    pub const ENCODED_LEN: usize = 98usize;
33901    pub const DEFAULT: Self = Self {
33902        ssid: CharArray::new([0_u8; 32usize]),
33903        password: CharArray::new([0_u8; 64usize]),
33904        mode: WifiConfigApMode::DEFAULT,
33905        response: WifiConfigApResponse::DEFAULT,
33906    };
33907    #[cfg(feature = "arbitrary")]
33908    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33909        use arbitrary::{Arbitrary, Unstructured};
33910        let mut buf = [0u8; 1024];
33911        rng.fill_bytes(&mut buf);
33912        let mut unstructured = Unstructured::new(&buf);
33913        Self::arbitrary(&mut unstructured).unwrap_or_default()
33914    }
33915}
33916impl Default for WIFI_CONFIG_AP_DATA {
33917    fn default() -> Self {
33918        Self::DEFAULT.clone()
33919    }
33920}
33921impl MessageData for WIFI_CONFIG_AP_DATA {
33922    type Message = MavMessage;
33923    const ID: u32 = 299u32;
33924    const NAME: &'static str = "WIFI_CONFIG_AP";
33925    const EXTRA_CRC: u8 = 19u8;
33926    const ENCODED_LEN: usize = 98usize;
33927    fn deser(
33928        _version: MavlinkVersion,
33929        __input: &[u8],
33930    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33931        let avail_len = __input.len();
33932        let mut payload_buf = [0; Self::ENCODED_LEN];
33933        let mut buf = if avail_len < Self::ENCODED_LEN {
33934            payload_buf[0..avail_len].copy_from_slice(__input);
33935            Bytes::new(&payload_buf)
33936        } else {
33937            Bytes::new(__input)
33938        };
33939        let mut __struct = Self::default();
33940        let mut tmp = [0_u8; 32usize];
33941        for v in &mut tmp {
33942            *v = buf.get_u8()?;
33943        }
33944        __struct.ssid = CharArray::new(tmp);
33945        let mut tmp = [0_u8; 64usize];
33946        for v in &mut tmp {
33947            *v = buf.get_u8()?;
33948        }
33949        __struct.password = CharArray::new(tmp);
33950        let tmp = buf.get_i8()?;
33951        __struct.mode =
33952            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33953                enum_type: "WifiConfigApMode",
33954                value: tmp as u64,
33955            })?;
33956        let tmp = buf.get_i8()?;
33957        __struct.response =
33958            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33959                enum_type: "WifiConfigApResponse",
33960                value: tmp as u64,
33961            })?;
33962        Ok(__struct)
33963    }
33964    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33965        let mut __tmp = BytesMut::new(bytes);
33966        #[allow(clippy::absurd_extreme_comparisons)]
33967        #[allow(unused_comparisons)]
33968        if __tmp.remaining() < Self::ENCODED_LEN {
33969            panic!(
33970                "buffer is too small (need {} bytes, but got {})",
33971                Self::ENCODED_LEN,
33972                __tmp.remaining(),
33973            )
33974        }
33975        for val in &self.ssid {
33976            __tmp.put_u8(*val);
33977        }
33978        for val in &self.password {
33979            __tmp.put_u8(*val);
33980        }
33981        if matches!(version, MavlinkVersion::V2) {
33982            __tmp.put_i8(self.mode as i8);
33983            __tmp.put_i8(self.response as i8);
33984            let len = __tmp.len();
33985            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33986        } else {
33987            __tmp.len()
33988        }
33989    }
33990}
33991#[doc = "Winch status."]
33992#[doc = ""]
33993#[doc = "ID: 9005"]
33994#[derive(Debug, Clone, PartialEq)]
33995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33997#[cfg_attr(feature = "ts", derive(TS))]
33998#[cfg_attr(feature = "ts", ts(export))]
33999pub struct WINCH_STATUS_DATA {
34000    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
34001    pub time_usec: u64,
34002    #[doc = "Length of line released. NaN if unknown"]
34003    pub line_length: f32,
34004    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
34005    pub speed: f32,
34006    #[doc = "Tension on the line. NaN if unknown"]
34007    pub tension: f32,
34008    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
34009    pub voltage: f32,
34010    #[doc = "Current draw from the winch. NaN if unknown"]
34011    pub current: f32,
34012    #[doc = "Status flags"]
34013    pub status: MavWinchStatusFlag,
34014    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
34015    pub temperature: i16,
34016}
34017impl WINCH_STATUS_DATA {
34018    pub const ENCODED_LEN: usize = 34usize;
34019    pub const DEFAULT: Self = Self {
34020        time_usec: 0_u64,
34021        line_length: 0.0_f32,
34022        speed: 0.0_f32,
34023        tension: 0.0_f32,
34024        voltage: 0.0_f32,
34025        current: 0.0_f32,
34026        status: MavWinchStatusFlag::DEFAULT,
34027        temperature: 0_i16,
34028    };
34029    #[cfg(feature = "arbitrary")]
34030    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34031        use arbitrary::{Arbitrary, Unstructured};
34032        let mut buf = [0u8; 1024];
34033        rng.fill_bytes(&mut buf);
34034        let mut unstructured = Unstructured::new(&buf);
34035        Self::arbitrary(&mut unstructured).unwrap_or_default()
34036    }
34037}
34038impl Default for WINCH_STATUS_DATA {
34039    fn default() -> Self {
34040        Self::DEFAULT.clone()
34041    }
34042}
34043impl MessageData for WINCH_STATUS_DATA {
34044    type Message = MavMessage;
34045    const ID: u32 = 9005u32;
34046    const NAME: &'static str = "WINCH_STATUS";
34047    const EXTRA_CRC: u8 = 117u8;
34048    const ENCODED_LEN: usize = 34usize;
34049    fn deser(
34050        _version: MavlinkVersion,
34051        __input: &[u8],
34052    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34053        let avail_len = __input.len();
34054        let mut payload_buf = [0; Self::ENCODED_LEN];
34055        let mut buf = if avail_len < Self::ENCODED_LEN {
34056            payload_buf[0..avail_len].copy_from_slice(__input);
34057            Bytes::new(&payload_buf)
34058        } else {
34059            Bytes::new(__input)
34060        };
34061        let mut __struct = Self::default();
34062        __struct.time_usec = buf.get_u64_le()?;
34063        __struct.line_length = buf.get_f32_le()?;
34064        __struct.speed = buf.get_f32_le()?;
34065        __struct.tension = buf.get_f32_le()?;
34066        __struct.voltage = buf.get_f32_le()?;
34067        __struct.current = buf.get_f32_le()?;
34068        let tmp = buf.get_u32_le()?;
34069        __struct.status = MavWinchStatusFlag::from_bits(tmp as <MavWinchStatusFlag as Flags>::Bits)
34070            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
34071                flag_type: "MavWinchStatusFlag",
34072                value: tmp as u64,
34073            })?;
34074        __struct.temperature = buf.get_i16_le()?;
34075        Ok(__struct)
34076    }
34077    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34078        let mut __tmp = BytesMut::new(bytes);
34079        #[allow(clippy::absurd_extreme_comparisons)]
34080        #[allow(unused_comparisons)]
34081        if __tmp.remaining() < Self::ENCODED_LEN {
34082            panic!(
34083                "buffer is too small (need {} bytes, but got {})",
34084                Self::ENCODED_LEN,
34085                __tmp.remaining(),
34086            )
34087        }
34088        __tmp.put_u64_le(self.time_usec);
34089        __tmp.put_f32_le(self.line_length);
34090        __tmp.put_f32_le(self.speed);
34091        __tmp.put_f32_le(self.tension);
34092        __tmp.put_f32_le(self.voltage);
34093        __tmp.put_f32_le(self.current);
34094        __tmp.put_u32_le(self.status.bits() as u32);
34095        __tmp.put_i16_le(self.temperature);
34096        if matches!(version, MavlinkVersion::V2) {
34097            let len = __tmp.len();
34098            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34099        } else {
34100            __tmp.len()
34101        }
34102    }
34103}
34104#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
34105#[doc = ""]
34106#[doc = "ID: 231"]
34107#[derive(Debug, Clone, PartialEq)]
34108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34109#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34110#[cfg_attr(feature = "ts", derive(TS))]
34111#[cfg_attr(feature = "ts", ts(export))]
34112pub struct WIND_COV_DATA {
34113    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
34114    pub time_usec: u64,
34115    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
34116    pub wind_x: f32,
34117    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
34118    pub wind_y: f32,
34119    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
34120    pub wind_z: f32,
34121    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34122    pub var_horiz: f32,
34123    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34124    pub var_vert: f32,
34125    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
34126    pub wind_alt: f32,
34127    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
34128    pub horiz_accuracy: f32,
34129    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
34130    pub vert_accuracy: f32,
34131}
34132impl WIND_COV_DATA {
34133    pub const ENCODED_LEN: usize = 40usize;
34134    pub const DEFAULT: Self = Self {
34135        time_usec: 0_u64,
34136        wind_x: 0.0_f32,
34137        wind_y: 0.0_f32,
34138        wind_z: 0.0_f32,
34139        var_horiz: 0.0_f32,
34140        var_vert: 0.0_f32,
34141        wind_alt: 0.0_f32,
34142        horiz_accuracy: 0.0_f32,
34143        vert_accuracy: 0.0_f32,
34144    };
34145    #[cfg(feature = "arbitrary")]
34146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34147        use arbitrary::{Arbitrary, Unstructured};
34148        let mut buf = [0u8; 1024];
34149        rng.fill_bytes(&mut buf);
34150        let mut unstructured = Unstructured::new(&buf);
34151        Self::arbitrary(&mut unstructured).unwrap_or_default()
34152    }
34153}
34154impl Default for WIND_COV_DATA {
34155    fn default() -> Self {
34156        Self::DEFAULT.clone()
34157    }
34158}
34159impl MessageData for WIND_COV_DATA {
34160    type Message = MavMessage;
34161    const ID: u32 = 231u32;
34162    const NAME: &'static str = "WIND_COV";
34163    const EXTRA_CRC: u8 = 105u8;
34164    const ENCODED_LEN: usize = 40usize;
34165    fn deser(
34166        _version: MavlinkVersion,
34167        __input: &[u8],
34168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34169        let avail_len = __input.len();
34170        let mut payload_buf = [0; Self::ENCODED_LEN];
34171        let mut buf = if avail_len < Self::ENCODED_LEN {
34172            payload_buf[0..avail_len].copy_from_slice(__input);
34173            Bytes::new(&payload_buf)
34174        } else {
34175            Bytes::new(__input)
34176        };
34177        let mut __struct = Self::default();
34178        __struct.time_usec = buf.get_u64_le()?;
34179        __struct.wind_x = buf.get_f32_le()?;
34180        __struct.wind_y = buf.get_f32_le()?;
34181        __struct.wind_z = buf.get_f32_le()?;
34182        __struct.var_horiz = buf.get_f32_le()?;
34183        __struct.var_vert = buf.get_f32_le()?;
34184        __struct.wind_alt = buf.get_f32_le()?;
34185        __struct.horiz_accuracy = buf.get_f32_le()?;
34186        __struct.vert_accuracy = buf.get_f32_le()?;
34187        Ok(__struct)
34188    }
34189    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34190        let mut __tmp = BytesMut::new(bytes);
34191        #[allow(clippy::absurd_extreme_comparisons)]
34192        #[allow(unused_comparisons)]
34193        if __tmp.remaining() < Self::ENCODED_LEN {
34194            panic!(
34195                "buffer is too small (need {} bytes, but got {})",
34196                Self::ENCODED_LEN,
34197                __tmp.remaining(),
34198            )
34199        }
34200        __tmp.put_u64_le(self.time_usec);
34201        __tmp.put_f32_le(self.wind_x);
34202        __tmp.put_f32_le(self.wind_y);
34203        __tmp.put_f32_le(self.wind_z);
34204        __tmp.put_f32_le(self.var_horiz);
34205        __tmp.put_f32_le(self.var_vert);
34206        __tmp.put_f32_le(self.wind_alt);
34207        __tmp.put_f32_le(self.horiz_accuracy);
34208        __tmp.put_f32_le(self.vert_accuracy);
34209        if matches!(version, MavlinkVersion::V2) {
34210            let len = __tmp.len();
34211            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34212        } else {
34213            __tmp.len()
34214        }
34215    }
34216}
34217#[derive(Clone, PartialEq, Debug)]
34218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34219#[cfg_attr(feature = "serde", serde(tag = "type"))]
34220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34221#[cfg_attr(feature = "ts", derive(TS))]
34222#[cfg_attr(feature = "ts", ts(export))]
34223#[repr(u32)]
34224pub enum MavMessage {
34225    #[doc = "Set the vehicle attitude and body angular rates."]
34226    #[doc = ""]
34227    #[doc = "ID: 140"]
34228    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
34229    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
34230    #[doc = ""]
34231    #[doc = "ID: 375"]
34232    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
34233    #[doc = "The location and information of an ADSB vehicle."]
34234    #[doc = ""]
34235    #[doc = "ID: 246"]
34236    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
34237    #[doc = "The location and information of an AIS vessel."]
34238    #[doc = ""]
34239    #[doc = "ID: 301"]
34240    AIS_VESSEL(AIS_VESSEL_DATA),
34241    #[doc = "The current system altitude."]
34242    #[doc = ""]
34243    #[doc = "ID: 141"]
34244    ALTITUDE(ALTITUDE_DATA),
34245    #[doc = "ASL-fixed-wing controller data."]
34246    #[doc = ""]
34247    #[doc = "ID: 8004"]
34248    ASLCTRL_DATA(ASLCTRL_DATA_DATA),
34249    #[doc = "ASL-fixed-wing controller debug data."]
34250    #[doc = ""]
34251    #[doc = "ID: 8005"]
34252    ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA),
34253    #[doc = "Extended state information for ASLUAVs."]
34254    #[doc = ""]
34255    #[doc = "ID: 8006"]
34256    ASLUAV_STATUS(ASLUAV_STATUS_DATA),
34257    #[doc = "Off-board controls/commands for ASLUAVs."]
34258    #[doc = ""]
34259    #[doc = "ID: 8008"]
34260    ASL_OBCTRL(ASL_OBCTRL_DATA),
34261    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
34262    #[doc = ""]
34263    #[doc = "ID: 30"]
34264    ATTITUDE(ATTITUDE_DATA),
34265    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34266    #[doc = ""]
34267    #[doc = "ID: 31"]
34268    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
34269    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34270    #[doc = ""]
34271    #[doc = "ID: 61"]
34272    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
34273    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
34274    #[doc = ""]
34275    #[doc = "ID: 83"]
34276    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
34277    #[doc = "Motion capture attitude and position."]
34278    #[doc = ""]
34279    #[doc = "ID: 138"]
34280    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
34281    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
34282    #[doc = ""]
34283    #[doc = "ID: 7"]
34284    AUTH_KEY(AUTH_KEY_DATA),
34285    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
34286    #[doc = ""]
34287    #[doc = "ID: 286"]
34288    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
34289    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
34290    #[doc = ""]
34291    #[doc = "ID: 148"]
34292    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
34293    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
34294    #[doc = ""]
34295    #[doc = "ID: 435"]
34296    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
34297    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
34298    #[doc = ""]
34299    #[doc = "ID: 437"]
34300    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
34301    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
34302    #[doc = ""]
34303    #[doc = "ID: 372"]
34304    BATTERY_INFO(BATTERY_INFO_DATA),
34305    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
34306    #[doc = ""]
34307    #[doc = "ID: 147"]
34308    BATTERY_STATUS(BATTERY_STATUS_DATA),
34309    #[doc = "Report button state change."]
34310    #[doc = ""]
34311    #[doc = "ID: 257"]
34312    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
34313    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34314    #[doc = ""]
34315    #[doc = "ID: 262"]
34316    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
34317    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34318    #[doc = ""]
34319    #[doc = "ID: 271"]
34320    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
34321    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
34322    #[doc = ""]
34323    #[doc = "ID: 263"]
34324    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
34325    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34326    #[doc = ""]
34327    #[doc = "ID: 259"]
34328    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
34329    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34330    #[doc = ""]
34331    #[doc = "ID: 260"]
34332    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
34333    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
34334    #[doc = ""]
34335    #[doc = "ID: 277"]
34336    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
34337    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34338    #[doc = ""]
34339    #[doc = "ID: 276"]
34340    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
34341    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34342    #[doc = ""]
34343    #[doc = "ID: 275"]
34344    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
34345    #[doc = "Camera-IMU triggering and synchronisation message."]
34346    #[doc = ""]
34347    #[doc = "ID: 112"]
34348    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
34349    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
34350    #[doc = ""]
34351    #[doc = "ID: 387"]
34352    CANFD_FRAME(CANFD_FRAME_DATA),
34353    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
34354    #[doc = ""]
34355    #[doc = "ID: 388"]
34356    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
34357    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
34358    #[doc = ""]
34359    #[doc = "ID: 386"]
34360    CAN_FRAME(CAN_FRAME_DATA),
34361    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34362    #[doc = ""]
34363    #[doc = "ID: 336"]
34364    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
34365    #[doc = "Report current used cellular network status."]
34366    #[doc = ""]
34367    #[doc = "ID: 334"]
34368    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
34369    #[doc = "Request to control this MAV."]
34370    #[doc = ""]
34371    #[doc = "ID: 5"]
34372    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
34373    #[doc = "Accept / deny control of this MAV."]
34374    #[doc = ""]
34375    #[doc = "ID: 6"]
34376    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
34377    #[doc = "Information about a potential collision."]
34378    #[doc = ""]
34379    #[doc = "ID: 247"]
34380    COLLISION(COLLISION_DATA),
34381    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34382    #[doc = ""]
34383    #[doc = "ID: 77"]
34384    COMMAND_ACK(COMMAND_ACK_DATA),
34385    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34386    #[doc = ""]
34387    #[doc = "ID: 80"]
34388    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
34389    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34390    #[doc = ""]
34391    #[doc = "ID: 75"]
34392    COMMAND_INT(COMMAND_INT_DATA),
34393    #[doc = "Message encoding a command with parameters as scaled integers and additional metadata. Scaling depends on the actual command value."]
34394    #[doc = ""]
34395    #[doc = "ID: 223"]
34396    COMMAND_INT_STAMPED(COMMAND_INT_STAMPED_DATA),
34397    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34398    #[doc = ""]
34399    #[doc = "ID: 76"]
34400    COMMAND_LONG(COMMAND_LONG_DATA),
34401    #[doc = "Send a command with up to seven parameters to the MAV and additional metadata."]
34402    #[doc = ""]
34403    #[doc = "ID: 224"]
34404    COMMAND_LONG_STAMPED(COMMAND_LONG_STAMPED_DATA),
34405    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
34406    #[doc = ""]
34407    #[doc = "ID: 395"]
34408    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
34409    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
34410    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
34411    #[doc = ""]
34412    #[doc = "ID: 396"]
34413    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
34414    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
34415    #[doc = ""]
34416    #[doc = "ID: 397"]
34417    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
34418    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
34419    #[doc = ""]
34420    #[doc = "ID: 146"]
34421    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
34422    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
34423    #[doc = ""]
34424    #[doc = "ID: 411"]
34425    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
34426    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
34427    #[doc = ""]
34428    #[doc = "ID: 436"]
34429    CURRENT_MODE(CURRENT_MODE_DATA),
34430    #[doc = "Data stream status information."]
34431    #[doc = ""]
34432    #[doc = "ID: 67"]
34433    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
34434    DATA_STREAM(DATA_STREAM_DATA),
34435    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
34436    #[doc = ""]
34437    #[doc = "ID: 130"]
34438    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
34439    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
34440    #[doc = ""]
34441    #[doc = "ID: 254"]
34442    DEBUG(DEBUG_DATA),
34443    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
34444    #[doc = ""]
34445    #[doc = "ID: 350"]
34446    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
34447    #[doc = "To debug something using a named 3D vector."]
34448    #[doc = ""]
34449    #[doc = "ID: 250"]
34450    DEBUG_VECT(DEBUG_VECT_DATA),
34451    #[doc = "Distance sensor information for an onboard rangefinder."]
34452    #[doc = ""]
34453    #[doc = "ID: 132"]
34454    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
34455    #[doc = "EFI status output."]
34456    #[doc = ""]
34457    #[doc = "ID: 225"]
34458    EFI_STATUS(EFI_STATUS_DATA),
34459    #[doc = "Extended EKF state estimates for ASLUAVs."]
34460    #[doc = ""]
34461    #[doc = "ID: 8007"]
34462    EKF_EXT(EKF_EXT_DATA),
34463    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
34464    #[doc = ""]
34465    #[doc = "ID: 131"]
34466    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
34467    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
34468    #[doc = ""]
34469    #[doc = "ID: 290"]
34470    ESC_INFO(ESC_INFO_DATA),
34471    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
34472    #[doc = ""]
34473    #[doc = "ID: 291"]
34474    ESC_STATUS(ESC_STATUS_DATA),
34475    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
34476    #[doc = ""]
34477    #[doc = "ID: 230"]
34478    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
34479    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
34480    #[doc = ""]
34481    #[doc = "ID: 410"]
34482    EVENT(EVENT_DATA),
34483    #[doc = "Provides state for additional features."]
34484    #[doc = ""]
34485    #[doc = "ID: 245"]
34486    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
34487    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
34488    #[doc = ""]
34489    #[doc = "ID: 162"]
34490    FENCE_STATUS(FENCE_STATUS_DATA),
34491    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
34492    #[doc = ""]
34493    #[doc = "ID: 110"]
34494    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
34495    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
34496    #[doc = ""]
34497    #[doc = "ID: 264"]
34498    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
34499    #[doc = "Current motion information from a designated system."]
34500    #[doc = ""]
34501    #[doc = "ID: 144"]
34502    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
34503    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
34504    #[doc = ""]
34505    #[doc = "ID: 371"]
34506    FUEL_STATUS(FUEL_STATUS_DATA),
34507    #[doc = "Fixed-wing soaring (i.e. thermal seeking) data."]
34508    #[doc = ""]
34509    #[doc = "ID: 8011"]
34510    FW_SOARING_DATA(FW_SOARING_DATA_DATA),
34511    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
34512    #[doc = ""]
34513    #[doc = "ID: 373"]
34514    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
34515    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
34516    #[doc = ""]
34517    #[doc = "ID: 285"]
34518    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
34519    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
34520    #[doc = ""]
34521    #[doc = "ID: 283"]
34522    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
34523    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
34524    #[doc = ""]
34525    #[doc = "ID: 284"]
34526    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
34527    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
34528    #[doc = ""]
34529    #[doc = "ID: 280"]
34530    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
34531    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
34532    #[doc = ""]
34533    #[doc = "ID: 282"]
34534    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
34535    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
34536    #[doc = ""]
34537    #[doc = "ID: 288"]
34538    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
34539    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
34540    #[doc = ""]
34541    #[doc = "ID: 287"]
34542    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
34543    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
34544    #[doc = ""]
34545    #[doc = "ID: 281"]
34546    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
34547    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
34548    #[doc = ""]
34549    #[doc = "ID: 33"]
34550    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
34551    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
34552    #[doc = ""]
34553    #[doc = "ID: 63"]
34554    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
34555    #[doc = "Global position/attitude estimate from a vision source."]
34556    #[doc = ""]
34557    #[doc = "ID: 101"]
34558    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
34559    #[doc = "Second GPS data."]
34560    #[doc = ""]
34561    #[doc = "ID: 124"]
34562    GPS2_RAW(GPS2_RAW_DATA),
34563    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34564    #[doc = ""]
34565    #[doc = "ID: 128"]
34566    GPS2_RTK(GPS2_RTK_DATA),
34567    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
34568    #[doc = ""]
34569    #[doc = "ID: 49"]
34570    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
34571    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
34572    #[doc = ""]
34573    #[doc = "ID: 123"]
34574    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
34575    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
34576    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
34577    #[doc = ""]
34578    #[doc = "ID: 232"]
34579    GPS_INPUT(GPS_INPUT_DATA),
34580    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34581    #[doc = ""]
34582    #[doc = "ID: 24"]
34583    GPS_RAW_INT(GPS_RAW_INT_DATA),
34584    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
34585    #[doc = ""]
34586    #[doc = "ID: 233"]
34587    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
34588    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34589    #[doc = ""]
34590    #[doc = "ID: 127"]
34591    GPS_RTK(GPS_RTK_DATA),
34592    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
34593    #[doc = ""]
34594    #[doc = "ID: 25"]
34595    GPS_STATUS(GPS_STATUS_DATA),
34596    #[doc = "Status of GSM modem (connected to onboard computer)."]
34597    #[doc = ""]
34598    #[doc = "ID: 8014"]
34599    GSM_LINK_STATUS(GSM_LINK_STATUS_DATA),
34600    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
34601    #[doc = ""]
34602    #[doc = "ID: 0"]
34603    HEARTBEAT(HEARTBEAT_DATA),
34604    #[doc = "The IMU readings in SI units in NED body frame."]
34605    #[doc = ""]
34606    #[doc = "ID: 105"]
34607    HIGHRES_IMU(HIGHRES_IMU_DATA),
34608    #[doc = "Message appropriate for high latency connections like Iridium."]
34609    #[doc = ""]
34610    #[doc = "ID: 234"]
34611    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
34612    HIGH_LATENCY(HIGH_LATENCY_DATA),
34613    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
34614    #[doc = ""]
34615    #[doc = "ID: 235"]
34616    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
34617    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
34618    #[doc = ""]
34619    #[doc = "ID: 93"]
34620    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
34621    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
34622    #[doc = ""]
34623    #[doc = "ID: 91"]
34624    HIL_CONTROLS(HIL_CONTROLS_DATA),
34625    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34626    #[doc = ""]
34627    #[doc = "ID: 113"]
34628    HIL_GPS(HIL_GPS_DATA),
34629    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
34630    #[doc = ""]
34631    #[doc = "ID: 114"]
34632    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
34633    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
34634    #[doc = ""]
34635    #[doc = "ID: 92"]
34636    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
34637    #[doc = "The IMU readings in SI units in NED body frame."]
34638    #[doc = ""]
34639    #[doc = "ID: 107"]
34640    HIL_SENSOR(HIL_SENSOR_DATA),
34641    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34642    #[doc = ""]
34643    #[doc = "ID: 90"]
34644    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
34645    HIL_STATE(HIL_STATE_DATA),
34646    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34647    #[doc = ""]
34648    #[doc = "ID: 115"]
34649    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
34650    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
34651    #[doc = ""]
34652    #[doc = "ID: 242"]
34653    HOME_POSITION(HOME_POSITION_DATA),
34654    #[doc = "Temperature and humidity from hygrometer."]
34655    #[doc = ""]
34656    #[doc = "ID: 12920"]
34657    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
34658    #[doc = "Illuminator status."]
34659    #[doc = ""]
34660    #[doc = "ID: 440"]
34661    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
34662    #[doc = "Status of the Iridium SBD link."]
34663    #[doc = ""]
34664    #[doc = "ID: 335"]
34665    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
34666    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
34667    #[doc = ""]
34668    #[doc = "ID: 149"]
34669    LANDING_TARGET(LANDING_TARGET_DATA),
34670    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
34671    #[doc = ""]
34672    #[doc = "ID: 8"]
34673    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
34674    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34675    #[doc = ""]
34676    #[doc = "ID: 32"]
34677    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
34678    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34679    #[doc = ""]
34680    #[doc = "ID: 64"]
34681    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
34682    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34683    #[doc = ""]
34684    #[doc = "ID: 89"]
34685    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
34686    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
34687    #[doc = ""]
34688    #[doc = "ID: 268"]
34689    LOGGING_ACK(LOGGING_ACK_DATA),
34690    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
34691    #[doc = ""]
34692    #[doc = "ID: 266"]
34693    LOGGING_DATA(LOGGING_DATA_DATA),
34694    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
34695    #[doc = ""]
34696    #[doc = "ID: 267"]
34697    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
34698    #[doc = "Reply to LOG_REQUEST_DATA."]
34699    #[doc = ""]
34700    #[doc = "ID: 120"]
34701    LOG_DATA(LOG_DATA_DATA),
34702    #[doc = "Reply to LOG_REQUEST_LIST."]
34703    #[doc = ""]
34704    #[doc = "ID: 118"]
34705    LOG_ENTRY(LOG_ENTRY_DATA),
34706    #[doc = "Erase all logs."]
34707    #[doc = ""]
34708    #[doc = "ID: 121"]
34709    LOG_ERASE(LOG_ERASE_DATA),
34710    #[doc = "Request a chunk of a log."]
34711    #[doc = ""]
34712    #[doc = "ID: 119"]
34713    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
34714    #[doc = "Stop log transfer and resume normal logging."]
34715    #[doc = ""]
34716    #[doc = "ID: 122"]
34717    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
34718    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
34719    #[doc = ""]
34720    #[doc = "ID: 117"]
34721    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
34722    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
34723    #[doc = ""]
34724    #[doc = "ID: 192"]
34725    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
34726    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
34727    #[doc = ""]
34728    #[doc = "ID: 69"]
34729    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
34730    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
34731    #[doc = ""]
34732    #[doc = "ID: 81"]
34733    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
34734    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34735    #[doc = ""]
34736    #[doc = "ID: 249"]
34737    MEMORY_VECT(MEMORY_VECT_DATA),
34738    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
34739    #[doc = ""]
34740    #[doc = "ID: 244"]
34741    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
34742    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
34743    #[doc = ""]
34744    #[doc = "ID: 47"]
34745    MISSION_ACK(MISSION_ACK_DATA),
34746    #[doc = "Delete all mission items at once."]
34747    #[doc = ""]
34748    #[doc = "ID: 45"]
34749    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
34750    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
34751    #[doc = ""]
34752    #[doc = "ID: 44"]
34753    MISSION_COUNT(MISSION_COUNT_DATA),
34754    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
34755    #[doc = ""]
34756    #[doc = "ID: 42"]
34757    MISSION_CURRENT(MISSION_CURRENT_DATA),
34758    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34759    #[doc = ""]
34760    #[doc = "ID: 39"]
34761    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
34762    MISSION_ITEM(MISSION_ITEM_DATA),
34763    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34764    #[doc = ""]
34765    #[doc = "ID: 73"]
34766    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
34767    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
34768    #[doc = ""]
34769    #[doc = "ID: 46"]
34770    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
34771    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
34772    #[doc = ""]
34773    #[doc = "ID: 40"]
34774    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
34775    MISSION_REQUEST(MISSION_REQUEST_DATA),
34776    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
34777    #[doc = ""]
34778    #[doc = "ID: 51"]
34779    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
34780    #[doc = "Request the overall list of mission items from the system/component."]
34781    #[doc = ""]
34782    #[doc = "ID: 43"]
34783    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
34784    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
34785    #[doc = ""]
34786    #[doc = "ID: 37"]
34787    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
34788    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
34789    #[doc = ""]
34790    #[doc = "ID: 41"]
34791    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
34792    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
34793    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
34794    #[doc = ""]
34795    #[doc = "ID: 38"]
34796    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
34797    #[doc = "Orientation of a mount."]
34798    #[doc = ""]
34799    #[doc = "ID: 265"]
34800    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
34801    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
34802    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34803    #[doc = ""]
34804    #[doc = "ID: 251"]
34805    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
34806    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34807    #[doc = ""]
34808    #[doc = "ID: 252"]
34809    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
34810    #[doc = "The state of the navigation and position controller."]
34811    #[doc = ""]
34812    #[doc = "ID: 62"]
34813    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
34814    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
34815    #[doc = ""]
34816    #[doc = "ID: 330"]
34817    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
34818    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
34819    #[doc = ""]
34820    #[doc = "ID: 331"]
34821    ODOMETRY(ODOMETRY_DATA),
34822    #[doc = "Hardware status sent by an onboard computer."]
34823    #[doc = ""]
34824    #[doc = "ID: 390"]
34825    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
34826    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
34827    #[doc = ""]
34828    #[doc = "ID: 12918"]
34829    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
34830    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
34831    #[doc = ""]
34832    #[doc = "ID: 12902"]
34833    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
34834    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
34835    #[doc = ""]
34836    #[doc = "ID: 12900"]
34837    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
34838    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
34839    #[doc = ""]
34840    #[doc = "ID: 12901"]
34841    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
34842    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
34843    #[doc = ""]
34844    #[doc = "ID: 12915"]
34845    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
34846    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
34847    #[doc = ""]
34848    #[doc = "ID: 12905"]
34849    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
34850    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
34851    #[doc = ""]
34852    #[doc = "ID: 12903"]
34853    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
34854    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
34855    #[doc = ""]
34856    #[doc = "ID: 12904"]
34857    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
34858    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
34859    #[doc = ""]
34860    #[doc = "ID: 12919"]
34861    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
34862    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
34863    #[doc = ""]
34864    #[doc = "ID: 100"]
34865    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
34866    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
34867    #[doc = ""]
34868    #[doc = "ID: 106"]
34869    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
34870    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
34871    #[doc = ""]
34872    #[doc = "ID: 360"]
34873    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
34874    #[doc = "Response from a PARAM_EXT_SET message."]
34875    #[doc = ""]
34876    #[doc = "ID: 324"]
34877    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
34878    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
34879    #[doc = ""]
34880    #[doc = "ID: 321"]
34881    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
34882    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
34883    #[doc = ""]
34884    #[doc = "ID: 320"]
34885    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
34886    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
34887    #[doc = ""]
34888    #[doc = "ID: 323"]
34889    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
34890    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
34891    #[doc = ""]
34892    #[doc = "ID: 322"]
34893    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
34894    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
34895    #[doc = ""]
34896    #[doc = "ID: 50"]
34897    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
34898    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34899    #[doc = ""]
34900    #[doc = "ID: 21"]
34901    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
34902    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
34903    #[doc = ""]
34904    #[doc = "ID: 20"]
34905    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
34906    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34907    #[doc = ""]
34908    #[doc = "ID: 23"]
34909    PARAM_SET(PARAM_SET_DATA),
34910    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34911    #[doc = ""]
34912    #[doc = "ID: 22"]
34913    PARAM_VALUE(PARAM_VALUE_DATA),
34914    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
34915    #[doc = ""]
34916    #[doc = "ID: 4"]
34917    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
34918    PING(PING_DATA),
34919    #[doc = "Control vehicle tone generation (buzzer)."]
34920    #[doc = ""]
34921    #[doc = "ID: 258"]
34922    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
34923    PLAY_TUNE(PLAY_TUNE_DATA),
34924    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
34925    #[doc = ""]
34926    #[doc = "ID: 400"]
34927    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
34928    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
34929    #[doc = ""]
34930    #[doc = "ID: 87"]
34931    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
34932    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
34933    #[doc = ""]
34934    #[doc = "ID: 85"]
34935    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
34936    #[doc = "Power supply status."]
34937    #[doc = ""]
34938    #[doc = "ID: 125"]
34939    POWER_STATUS(POWER_STATUS_DATA),
34940    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
34941    #[doc = ""]
34942    #[doc = "ID: 300"]
34943    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
34944    #[doc = "Status generated by radio and injected into MAVLink stream."]
34945    #[doc = ""]
34946    #[doc = "ID: 109"]
34947    RADIO_STATUS(RADIO_STATUS_DATA),
34948    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
34949    #[doc = ""]
34950    #[doc = "ID: 27"]
34951    RAW_IMU(RAW_IMU_DATA),
34952    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
34953    #[doc = ""]
34954    #[doc = "ID: 28"]
34955    RAW_PRESSURE(RAW_PRESSURE_DATA),
34956    #[doc = "RPM sensor data message."]
34957    #[doc = ""]
34958    #[doc = "ID: 339"]
34959    RAW_RPM(RAW_RPM_DATA),
34960    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34961    #[doc = ""]
34962    #[doc = "ID: 65"]
34963    RC_CHANNELS(RC_CHANNELS_DATA),
34964    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
34965    #[doc = ""]
34966    #[doc = "ID: 70"]
34967    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
34968    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34969    #[doc = ""]
34970    #[doc = "ID: 35"]
34971    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
34972    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
34973    #[doc = ""]
34974    #[doc = "ID: 34"]
34975    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
34976    #[doc = "Request a data stream."]
34977    #[doc = ""]
34978    #[doc = "ID: 66"]
34979    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
34980    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
34981    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
34982    #[doc = ""]
34983    #[doc = "ID: 412"]
34984    REQUEST_EVENT(REQUEST_EVENT_DATA),
34985    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
34986    #[doc = ""]
34987    #[doc = "ID: 142"]
34988    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
34989    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
34990    #[doc = ""]
34991    #[doc = "ID: 413"]
34992    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
34993    #[doc = "Read out the safety zone the MAV currently assumes."]
34994    #[doc = ""]
34995    #[doc = "ID: 55"]
34996    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
34997    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
34998    #[doc = ""]
34999    #[doc = "ID: 54"]
35000    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
35001    #[doc = "Status of the SatCom link."]
35002    #[doc = ""]
35003    #[doc = "ID: 8015"]
35004    SATCOM_LINK_STATUS(SATCOM_LINK_STATUS_DATA),
35005    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
35006    #[doc = ""]
35007    #[doc = "ID: 26"]
35008    SCALED_IMU(SCALED_IMU_DATA),
35009    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
35010    #[doc = ""]
35011    #[doc = "ID: 116"]
35012    SCALED_IMU2(SCALED_IMU2_DATA),
35013    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
35014    #[doc = ""]
35015    #[doc = "ID: 129"]
35016    SCALED_IMU3(SCALED_IMU3_DATA),
35017    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
35018    #[doc = ""]
35019    #[doc = "ID: 29"]
35020    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
35021    #[doc = "Barometer readings for 2nd barometer."]
35022    #[doc = ""]
35023    #[doc = "ID: 137"]
35024    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
35025    #[doc = "Barometer readings for 3rd barometer."]
35026    #[doc = ""]
35027    #[doc = "ID: 143"]
35028    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
35029    #[doc = "Monitoring of sensorpod status."]
35030    #[doc = ""]
35031    #[doc = "ID: 8012"]
35032    SENSORPOD_STATUS(SENSORPOD_STATUS_DATA),
35033    #[doc = "Calibrated airflow angle measurements."]
35034    #[doc = ""]
35035    #[doc = "ID: 8016"]
35036    SENSOR_AIRFLOW_ANGLES(SENSOR_AIRFLOW_ANGLES_DATA),
35037    #[doc = "Atmospheric sensors (temperature, humidity, ...)."]
35038    #[doc = ""]
35039    #[doc = "ID: 8009"]
35040    SENS_ATMOS(SENS_ATMOS_DATA),
35041    #[doc = "Battery pack monitoring data for Li-Ion batteries."]
35042    #[doc = ""]
35043    #[doc = "ID: 8010"]
35044    SENS_BATMON(SENS_BATMON_DATA),
35045    #[doc = "Maximum Power Point Tracker (MPPT) sensor data for solar module power performance tracking."]
35046    #[doc = ""]
35047    #[doc = "ID: 8003"]
35048    SENS_MPPT(SENS_MPPT_DATA),
35049    #[doc = "Voltage and current sensor data."]
35050    #[doc = ""]
35051    #[doc = "ID: 8002"]
35052    SENS_POWER(SENS_POWER_DATA),
35053    #[doc = "Monitoring of power board status."]
35054    #[doc = ""]
35055    #[doc = "ID: 8013"]
35056    SENS_POWER_BOARD(SENS_POWER_BOARD_DATA),
35057    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
35058    #[doc = ""]
35059    #[doc = "ID: 126"]
35060    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
35061    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
35062    #[doc = ""]
35063    #[doc = "ID: 36"]
35064    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
35065    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
35066    #[doc = ""]
35067    #[doc = "ID: 256"]
35068    SETUP_SIGNING(SETUP_SIGNING_DATA),
35069    #[doc = "Set the vehicle attitude and body angular rates."]
35070    #[doc = ""]
35071    #[doc = "ID: 139"]
35072    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
35073    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
35074    #[doc = ""]
35075    #[doc = "ID: 82"]
35076    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
35077    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
35078    #[doc = ""]
35079    #[doc = "ID: 48"]
35080    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
35081    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
35082    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
35083    #[doc = ""]
35084    #[doc = "ID: 243"]
35085    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
35086    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
35087    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
35088    #[doc = ""]
35089    #[doc = "ID: 11"]
35090    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
35091    SET_MODE(SET_MODE_DATA),
35092    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
35093    #[doc = ""]
35094    #[doc = "ID: 86"]
35095    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
35096    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
35097    #[doc = ""]
35098    #[doc = "ID: 84"]
35099    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
35100    #[doc = "Status of simulation environment, if used."]
35101    #[doc = ""]
35102    #[doc = "ID: 108"]
35103    SIM_STATE(SIM_STATE_DATA),
35104    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
35105    #[doc = ""]
35106    #[doc = "ID: 370"]
35107    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
35108    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
35109    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
35110    #[doc = ""]
35111    #[doc = "ID: 253"]
35112    STATUSTEXT(STATUSTEXT_DATA),
35113    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
35114    #[doc = ""]
35115    #[doc = "ID: 261"]
35116    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
35117    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
35118    #[doc = ""]
35119    #[doc = "ID: 401"]
35120    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
35121    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
35122    #[doc = ""]
35123    #[doc = "ID: 2"]
35124    SYSTEM_TIME(SYSTEM_TIME_DATA),
35125    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
35126    #[doc = ""]
35127    #[doc = "ID: 1"]
35128    SYS_STATUS(SYS_STATUS_DATA),
35129    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
35130    #[doc = ""]
35131    #[doc = "ID: 135"]
35132    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
35133    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35134    #[doc = ""]
35135    #[doc = "ID: 134"]
35136    TERRAIN_DATA(TERRAIN_DATA_DATA),
35137    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35138    #[doc = ""]
35139    #[doc = "ID: 136"]
35140    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
35141    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35142    #[doc = ""]
35143    #[doc = "ID: 133"]
35144    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
35145    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
35146    #[doc = ""]
35147    #[doc = "ID: 111"]
35148    TIMESYNC(TIMESYNC_DATA),
35149    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
35150    #[doc = ""]
35151    #[doc = "ID: 380"]
35152    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
35153    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
35154    #[doc = ""]
35155    #[doc = "ID: 333"]
35156    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
35157    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
35158    #[doc = ""]
35159    #[doc = "ID: 332"]
35160    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
35161    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
35162    #[doc = ""]
35163    #[doc = "ID: 385"]
35164    TUNNEL(TUNNEL_DATA),
35165    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
35166    #[doc = ""]
35167    #[doc = "ID: 311"]
35168    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
35169    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
35170    #[doc = ""]
35171    #[doc = "ID: 310"]
35172    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
35173    #[doc = "The global position resulting from GPS and sensor fusion."]
35174    #[doc = ""]
35175    #[doc = "ID: 340"]
35176    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
35177    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
35178    #[doc = ""]
35179    #[doc = "ID: 248"]
35180    V2_EXTENSION(V2_EXTENSION_DATA),
35181    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
35182    #[doc = ""]
35183    #[doc = "ID: 74"]
35184    VFR_HUD(VFR_HUD_DATA),
35185    #[doc = "Vibration levels and accelerometer clipping."]
35186    #[doc = ""]
35187    #[doc = "ID: 241"]
35188    VIBRATION(VIBRATION_DATA),
35189    #[doc = "Global position estimate from a Vicon motion system source."]
35190    #[doc = ""]
35191    #[doc = "ID: 104"]
35192    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
35193    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
35194    #[doc = ""]
35195    #[doc = "ID: 269"]
35196    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
35197    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
35198    #[doc = ""]
35199    #[doc = "ID: 270"]
35200    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
35201    #[doc = "Local position/attitude estimate from a vision source."]
35202    #[doc = ""]
35203    #[doc = "ID: 102"]
35204    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
35205    #[doc = "Speed estimate from a vision source."]
35206    #[doc = ""]
35207    #[doc = "ID: 103"]
35208    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
35209    #[doc = "Cumulative distance traveled for each reported wheel."]
35210    #[doc = ""]
35211    #[doc = "ID: 9000"]
35212    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
35213    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
35214    #[doc = ""]
35215    #[doc = "ID: 299"]
35216    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
35217    #[doc = "Winch status."]
35218    #[doc = ""]
35219    #[doc = "ID: 9005"]
35220    WINCH_STATUS(WINCH_STATUS_DATA),
35221    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
35222    #[doc = ""]
35223    #[doc = "ID: 231"]
35224    WIND_COV(WIND_COV_DATA),
35225}
35226impl MavMessage {
35227    pub const fn all_ids() -> &'static [u32] {
35228        &[
35229            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
35230            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
35231            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
35232            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
35233            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
35234            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
35235            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
35236            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
35237            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
35238            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
35239            148u32, 149u32, 162u32, 192u32, 223u32, 224u32, 225u32, 230u32, 231u32, 232u32, 233u32,
35240            234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32,
35241            250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32,
35242            262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32,
35243            276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32,
35244            290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32,
35245            324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32,
35246            360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32,
35247            390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32,
35248            436u32, 437u32, 440u32, 8002u32, 8003u32, 8004u32, 8005u32, 8006u32, 8007u32, 8008u32,
35249            8009u32, 8010u32, 8011u32, 8012u32, 8013u32, 8014u32, 8015u32, 8016u32, 9000u32,
35250            9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32, 12915u32,
35251            12918u32, 12919u32, 12920u32,
35252        ]
35253    }
35254    pub const fn all_messages() -> &'static [(&'static str, u32)] {
35255        &[
35256            (HEARTBEAT_DATA::NAME, HEARTBEAT_DATA::ID),
35257            (SYS_STATUS_DATA::NAME, SYS_STATUS_DATA::ID),
35258            (SYSTEM_TIME_DATA::NAME, SYSTEM_TIME_DATA::ID),
35259            (PING_DATA::NAME, PING_DATA::ID),
35260            (
35261                CHANGE_OPERATOR_CONTROL_DATA::NAME,
35262                CHANGE_OPERATOR_CONTROL_DATA::ID,
35263            ),
35264            (
35265                CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
35266                CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
35267            ),
35268            (AUTH_KEY_DATA::NAME, AUTH_KEY_DATA::ID),
35269            (LINK_NODE_STATUS_DATA::NAME, LINK_NODE_STATUS_DATA::ID),
35270            (SET_MODE_DATA::NAME, SET_MODE_DATA::ID),
35271            (PARAM_REQUEST_READ_DATA::NAME, PARAM_REQUEST_READ_DATA::ID),
35272            (PARAM_REQUEST_LIST_DATA::NAME, PARAM_REQUEST_LIST_DATA::ID),
35273            (PARAM_VALUE_DATA::NAME, PARAM_VALUE_DATA::ID),
35274            (PARAM_SET_DATA::NAME, PARAM_SET_DATA::ID),
35275            (GPS_RAW_INT_DATA::NAME, GPS_RAW_INT_DATA::ID),
35276            (GPS_STATUS_DATA::NAME, GPS_STATUS_DATA::ID),
35277            (SCALED_IMU_DATA::NAME, SCALED_IMU_DATA::ID),
35278            (RAW_IMU_DATA::NAME, RAW_IMU_DATA::ID),
35279            (RAW_PRESSURE_DATA::NAME, RAW_PRESSURE_DATA::ID),
35280            (SCALED_PRESSURE_DATA::NAME, SCALED_PRESSURE_DATA::ID),
35281            (ATTITUDE_DATA::NAME, ATTITUDE_DATA::ID),
35282            (ATTITUDE_QUATERNION_DATA::NAME, ATTITUDE_QUATERNION_DATA::ID),
35283            (LOCAL_POSITION_NED_DATA::NAME, LOCAL_POSITION_NED_DATA::ID),
35284            (GLOBAL_POSITION_INT_DATA::NAME, GLOBAL_POSITION_INT_DATA::ID),
35285            (RC_CHANNELS_SCALED_DATA::NAME, RC_CHANNELS_SCALED_DATA::ID),
35286            (RC_CHANNELS_RAW_DATA::NAME, RC_CHANNELS_RAW_DATA::ID),
35287            (SERVO_OUTPUT_RAW_DATA::NAME, SERVO_OUTPUT_RAW_DATA::ID),
35288            (
35289                MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
35290                MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
35291            ),
35292            (
35293                MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
35294                MISSION_WRITE_PARTIAL_LIST_DATA::ID,
35295            ),
35296            (MISSION_ITEM_DATA::NAME, MISSION_ITEM_DATA::ID),
35297            (MISSION_REQUEST_DATA::NAME, MISSION_REQUEST_DATA::ID),
35298            (MISSION_SET_CURRENT_DATA::NAME, MISSION_SET_CURRENT_DATA::ID),
35299            (MISSION_CURRENT_DATA::NAME, MISSION_CURRENT_DATA::ID),
35300            (
35301                MISSION_REQUEST_LIST_DATA::NAME,
35302                MISSION_REQUEST_LIST_DATA::ID,
35303            ),
35304            (MISSION_COUNT_DATA::NAME, MISSION_COUNT_DATA::ID),
35305            (MISSION_CLEAR_ALL_DATA::NAME, MISSION_CLEAR_ALL_DATA::ID),
35306            (
35307                MISSION_ITEM_REACHED_DATA::NAME,
35308                MISSION_ITEM_REACHED_DATA::ID,
35309            ),
35310            (MISSION_ACK_DATA::NAME, MISSION_ACK_DATA::ID),
35311            (
35312                SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
35313                SET_GPS_GLOBAL_ORIGIN_DATA::ID,
35314            ),
35315            (GPS_GLOBAL_ORIGIN_DATA::NAME, GPS_GLOBAL_ORIGIN_DATA::ID),
35316            (PARAM_MAP_RC_DATA::NAME, PARAM_MAP_RC_DATA::ID),
35317            (MISSION_REQUEST_INT_DATA::NAME, MISSION_REQUEST_INT_DATA::ID),
35318            (
35319                SAFETY_SET_ALLOWED_AREA_DATA::NAME,
35320                SAFETY_SET_ALLOWED_AREA_DATA::ID,
35321            ),
35322            (SAFETY_ALLOWED_AREA_DATA::NAME, SAFETY_ALLOWED_AREA_DATA::ID),
35323            (
35324                ATTITUDE_QUATERNION_COV_DATA::NAME,
35325                ATTITUDE_QUATERNION_COV_DATA::ID,
35326            ),
35327            (
35328                NAV_CONTROLLER_OUTPUT_DATA::NAME,
35329                NAV_CONTROLLER_OUTPUT_DATA::ID,
35330            ),
35331            (
35332                GLOBAL_POSITION_INT_COV_DATA::NAME,
35333                GLOBAL_POSITION_INT_COV_DATA::ID,
35334            ),
35335            (
35336                LOCAL_POSITION_NED_COV_DATA::NAME,
35337                LOCAL_POSITION_NED_COV_DATA::ID,
35338            ),
35339            (RC_CHANNELS_DATA::NAME, RC_CHANNELS_DATA::ID),
35340            (REQUEST_DATA_STREAM_DATA::NAME, REQUEST_DATA_STREAM_DATA::ID),
35341            (DATA_STREAM_DATA::NAME, DATA_STREAM_DATA::ID),
35342            (MANUAL_CONTROL_DATA::NAME, MANUAL_CONTROL_DATA::ID),
35343            (
35344                RC_CHANNELS_OVERRIDE_DATA::NAME,
35345                RC_CHANNELS_OVERRIDE_DATA::ID,
35346            ),
35347            (MISSION_ITEM_INT_DATA::NAME, MISSION_ITEM_INT_DATA::ID),
35348            (VFR_HUD_DATA::NAME, VFR_HUD_DATA::ID),
35349            (COMMAND_INT_DATA::NAME, COMMAND_INT_DATA::ID),
35350            (COMMAND_LONG_DATA::NAME, COMMAND_LONG_DATA::ID),
35351            (COMMAND_ACK_DATA::NAME, COMMAND_ACK_DATA::ID),
35352            (COMMAND_CANCEL_DATA::NAME, COMMAND_CANCEL_DATA::ID),
35353            (MANUAL_SETPOINT_DATA::NAME, MANUAL_SETPOINT_DATA::ID),
35354            (SET_ATTITUDE_TARGET_DATA::NAME, SET_ATTITUDE_TARGET_DATA::ID),
35355            (ATTITUDE_TARGET_DATA::NAME, ATTITUDE_TARGET_DATA::ID),
35356            (
35357                SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
35358                SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
35359            ),
35360            (
35361                POSITION_TARGET_LOCAL_NED_DATA::NAME,
35362                POSITION_TARGET_LOCAL_NED_DATA::ID,
35363            ),
35364            (
35365                SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35366                SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
35367            ),
35368            (
35369                POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35370                POSITION_TARGET_GLOBAL_INT_DATA::ID,
35371            ),
35372            (
35373                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME,
35374                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID,
35375            ),
35376            (HIL_STATE_DATA::NAME, HIL_STATE_DATA::ID),
35377            (HIL_CONTROLS_DATA::NAME, HIL_CONTROLS_DATA::ID),
35378            (HIL_RC_INPUTS_RAW_DATA::NAME, HIL_RC_INPUTS_RAW_DATA::ID),
35379            (
35380                HIL_ACTUATOR_CONTROLS_DATA::NAME,
35381                HIL_ACTUATOR_CONTROLS_DATA::ID,
35382            ),
35383            (OPTICAL_FLOW_DATA::NAME, OPTICAL_FLOW_DATA::ID),
35384            (
35385                GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
35386                GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
35387            ),
35388            (
35389                VISION_POSITION_ESTIMATE_DATA::NAME,
35390                VISION_POSITION_ESTIMATE_DATA::ID,
35391            ),
35392            (
35393                VISION_SPEED_ESTIMATE_DATA::NAME,
35394                VISION_SPEED_ESTIMATE_DATA::ID,
35395            ),
35396            (
35397                VICON_POSITION_ESTIMATE_DATA::NAME,
35398                VICON_POSITION_ESTIMATE_DATA::ID,
35399            ),
35400            (HIGHRES_IMU_DATA::NAME, HIGHRES_IMU_DATA::ID),
35401            (OPTICAL_FLOW_RAD_DATA::NAME, OPTICAL_FLOW_RAD_DATA::ID),
35402            (HIL_SENSOR_DATA::NAME, HIL_SENSOR_DATA::ID),
35403            (SIM_STATE_DATA::NAME, SIM_STATE_DATA::ID),
35404            (RADIO_STATUS_DATA::NAME, RADIO_STATUS_DATA::ID),
35405            (
35406                FILE_TRANSFER_PROTOCOL_DATA::NAME,
35407                FILE_TRANSFER_PROTOCOL_DATA::ID,
35408            ),
35409            (TIMESYNC_DATA::NAME, TIMESYNC_DATA::ID),
35410            (CAMERA_TRIGGER_DATA::NAME, CAMERA_TRIGGER_DATA::ID),
35411            (HIL_GPS_DATA::NAME, HIL_GPS_DATA::ID),
35412            (HIL_OPTICAL_FLOW_DATA::NAME, HIL_OPTICAL_FLOW_DATA::ID),
35413            (
35414                HIL_STATE_QUATERNION_DATA::NAME,
35415                HIL_STATE_QUATERNION_DATA::ID,
35416            ),
35417            (SCALED_IMU2_DATA::NAME, SCALED_IMU2_DATA::ID),
35418            (LOG_REQUEST_LIST_DATA::NAME, LOG_REQUEST_LIST_DATA::ID),
35419            (LOG_ENTRY_DATA::NAME, LOG_ENTRY_DATA::ID),
35420            (LOG_REQUEST_DATA_DATA::NAME, LOG_REQUEST_DATA_DATA::ID),
35421            (LOG_DATA_DATA::NAME, LOG_DATA_DATA::ID),
35422            (LOG_ERASE_DATA::NAME, LOG_ERASE_DATA::ID),
35423            (LOG_REQUEST_END_DATA::NAME, LOG_REQUEST_END_DATA::ID),
35424            (GPS_INJECT_DATA_DATA::NAME, GPS_INJECT_DATA_DATA::ID),
35425            (GPS2_RAW_DATA::NAME, GPS2_RAW_DATA::ID),
35426            (POWER_STATUS_DATA::NAME, POWER_STATUS_DATA::ID),
35427            (SERIAL_CONTROL_DATA::NAME, SERIAL_CONTROL_DATA::ID),
35428            (GPS_RTK_DATA::NAME, GPS_RTK_DATA::ID),
35429            (GPS2_RTK_DATA::NAME, GPS2_RTK_DATA::ID),
35430            (SCALED_IMU3_DATA::NAME, SCALED_IMU3_DATA::ID),
35431            (
35432                DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
35433                DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
35434            ),
35435            (ENCAPSULATED_DATA_DATA::NAME, ENCAPSULATED_DATA_DATA::ID),
35436            (DISTANCE_SENSOR_DATA::NAME, DISTANCE_SENSOR_DATA::ID),
35437            (TERRAIN_REQUEST_DATA::NAME, TERRAIN_REQUEST_DATA::ID),
35438            (TERRAIN_DATA_DATA::NAME, TERRAIN_DATA_DATA::ID),
35439            (TERRAIN_CHECK_DATA::NAME, TERRAIN_CHECK_DATA::ID),
35440            (TERRAIN_REPORT_DATA::NAME, TERRAIN_REPORT_DATA::ID),
35441            (SCALED_PRESSURE2_DATA::NAME, SCALED_PRESSURE2_DATA::ID),
35442            (ATT_POS_MOCAP_DATA::NAME, ATT_POS_MOCAP_DATA::ID),
35443            (
35444                SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
35445                SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
35446            ),
35447            (
35448                ACTUATOR_CONTROL_TARGET_DATA::NAME,
35449                ACTUATOR_CONTROL_TARGET_DATA::ID,
35450            ),
35451            (ALTITUDE_DATA::NAME, ALTITUDE_DATA::ID),
35452            (RESOURCE_REQUEST_DATA::NAME, RESOURCE_REQUEST_DATA::ID),
35453            (SCALED_PRESSURE3_DATA::NAME, SCALED_PRESSURE3_DATA::ID),
35454            (FOLLOW_TARGET_DATA::NAME, FOLLOW_TARGET_DATA::ID),
35455            (
35456                CONTROL_SYSTEM_STATE_DATA::NAME,
35457                CONTROL_SYSTEM_STATE_DATA::ID,
35458            ),
35459            (BATTERY_STATUS_DATA::NAME, BATTERY_STATUS_DATA::ID),
35460            (AUTOPILOT_VERSION_DATA::NAME, AUTOPILOT_VERSION_DATA::ID),
35461            (LANDING_TARGET_DATA::NAME, LANDING_TARGET_DATA::ID),
35462            (FENCE_STATUS_DATA::NAME, FENCE_STATUS_DATA::ID),
35463            (MAG_CAL_REPORT_DATA::NAME, MAG_CAL_REPORT_DATA::ID),
35464            (COMMAND_INT_STAMPED_DATA::NAME, COMMAND_INT_STAMPED_DATA::ID),
35465            (
35466                COMMAND_LONG_STAMPED_DATA::NAME,
35467                COMMAND_LONG_STAMPED_DATA::ID,
35468            ),
35469            (EFI_STATUS_DATA::NAME, EFI_STATUS_DATA::ID),
35470            (ESTIMATOR_STATUS_DATA::NAME, ESTIMATOR_STATUS_DATA::ID),
35471            (WIND_COV_DATA::NAME, WIND_COV_DATA::ID),
35472            (GPS_INPUT_DATA::NAME, GPS_INPUT_DATA::ID),
35473            (GPS_RTCM_DATA_DATA::NAME, GPS_RTCM_DATA_DATA::ID),
35474            (HIGH_LATENCY_DATA::NAME, HIGH_LATENCY_DATA::ID),
35475            (HIGH_LATENCY2_DATA::NAME, HIGH_LATENCY2_DATA::ID),
35476            (VIBRATION_DATA::NAME, VIBRATION_DATA::ID),
35477            (HOME_POSITION_DATA::NAME, HOME_POSITION_DATA::ID),
35478            (SET_HOME_POSITION_DATA::NAME, SET_HOME_POSITION_DATA::ID),
35479            (MESSAGE_INTERVAL_DATA::NAME, MESSAGE_INTERVAL_DATA::ID),
35480            (EXTENDED_SYS_STATE_DATA::NAME, EXTENDED_SYS_STATE_DATA::ID),
35481            (ADSB_VEHICLE_DATA::NAME, ADSB_VEHICLE_DATA::ID),
35482            (COLLISION_DATA::NAME, COLLISION_DATA::ID),
35483            (V2_EXTENSION_DATA::NAME, V2_EXTENSION_DATA::ID),
35484            (MEMORY_VECT_DATA::NAME, MEMORY_VECT_DATA::ID),
35485            (DEBUG_VECT_DATA::NAME, DEBUG_VECT_DATA::ID),
35486            (NAMED_VALUE_FLOAT_DATA::NAME, NAMED_VALUE_FLOAT_DATA::ID),
35487            (NAMED_VALUE_INT_DATA::NAME, NAMED_VALUE_INT_DATA::ID),
35488            (STATUSTEXT_DATA::NAME, STATUSTEXT_DATA::ID),
35489            (DEBUG_DATA::NAME, DEBUG_DATA::ID),
35490            (SETUP_SIGNING_DATA::NAME, SETUP_SIGNING_DATA::ID),
35491            (BUTTON_CHANGE_DATA::NAME, BUTTON_CHANGE_DATA::ID),
35492            (PLAY_TUNE_DATA::NAME, PLAY_TUNE_DATA::ID),
35493            (CAMERA_INFORMATION_DATA::NAME, CAMERA_INFORMATION_DATA::ID),
35494            (CAMERA_SETTINGS_DATA::NAME, CAMERA_SETTINGS_DATA::ID),
35495            (STORAGE_INFORMATION_DATA::NAME, STORAGE_INFORMATION_DATA::ID),
35496            (
35497                CAMERA_CAPTURE_STATUS_DATA::NAME,
35498                CAMERA_CAPTURE_STATUS_DATA::ID,
35499            ),
35500            (
35501                CAMERA_IMAGE_CAPTURED_DATA::NAME,
35502                CAMERA_IMAGE_CAPTURED_DATA::ID,
35503            ),
35504            (FLIGHT_INFORMATION_DATA::NAME, FLIGHT_INFORMATION_DATA::ID),
35505            (MOUNT_ORIENTATION_DATA::NAME, MOUNT_ORIENTATION_DATA::ID),
35506            (LOGGING_DATA_DATA::NAME, LOGGING_DATA_DATA::ID),
35507            (LOGGING_DATA_ACKED_DATA::NAME, LOGGING_DATA_ACKED_DATA::ID),
35508            (LOGGING_ACK_DATA::NAME, LOGGING_ACK_DATA::ID),
35509            (
35510                VIDEO_STREAM_INFORMATION_DATA::NAME,
35511                VIDEO_STREAM_INFORMATION_DATA::ID,
35512            ),
35513            (VIDEO_STREAM_STATUS_DATA::NAME, VIDEO_STREAM_STATUS_DATA::ID),
35514            (CAMERA_FOV_STATUS_DATA::NAME, CAMERA_FOV_STATUS_DATA::ID),
35515            (
35516                CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
35517                CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
35518            ),
35519            (
35520                CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
35521                CAMERA_TRACKING_GEO_STATUS_DATA::ID,
35522            ),
35523            (
35524                CAMERA_THERMAL_RANGE_DATA::NAME,
35525                CAMERA_THERMAL_RANGE_DATA::ID,
35526            ),
35527            (
35528                GIMBAL_MANAGER_INFORMATION_DATA::NAME,
35529                GIMBAL_MANAGER_INFORMATION_DATA::ID,
35530            ),
35531            (
35532                GIMBAL_MANAGER_STATUS_DATA::NAME,
35533                GIMBAL_MANAGER_STATUS_DATA::ID,
35534            ),
35535            (
35536                GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
35537                GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
35538            ),
35539            (
35540                GIMBAL_DEVICE_INFORMATION_DATA::NAME,
35541                GIMBAL_DEVICE_INFORMATION_DATA::ID,
35542            ),
35543            (
35544                GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
35545                GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
35546            ),
35547            (
35548                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
35549                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
35550            ),
35551            (
35552                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME,
35553                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID,
35554            ),
35555            (
35556                GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
35557                GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
35558            ),
35559            (
35560                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME,
35561                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID,
35562            ),
35563            (ESC_INFO_DATA::NAME, ESC_INFO_DATA::ID),
35564            (ESC_STATUS_DATA::NAME, ESC_STATUS_DATA::ID),
35565            (WIFI_CONFIG_AP_DATA::NAME, WIFI_CONFIG_AP_DATA::ID),
35566            (PROTOCOL_VERSION_DATA::NAME, PROTOCOL_VERSION_DATA::ID),
35567            (AIS_VESSEL_DATA::NAME, AIS_VESSEL_DATA::ID),
35568            (UAVCAN_NODE_STATUS_DATA::NAME, UAVCAN_NODE_STATUS_DATA::ID),
35569            (UAVCAN_NODE_INFO_DATA::NAME, UAVCAN_NODE_INFO_DATA::ID),
35570            (
35571                PARAM_EXT_REQUEST_READ_DATA::NAME,
35572                PARAM_EXT_REQUEST_READ_DATA::ID,
35573            ),
35574            (
35575                PARAM_EXT_REQUEST_LIST_DATA::NAME,
35576                PARAM_EXT_REQUEST_LIST_DATA::ID,
35577            ),
35578            (PARAM_EXT_VALUE_DATA::NAME, PARAM_EXT_VALUE_DATA::ID),
35579            (PARAM_EXT_SET_DATA::NAME, PARAM_EXT_SET_DATA::ID),
35580            (PARAM_EXT_ACK_DATA::NAME, PARAM_EXT_ACK_DATA::ID),
35581            (OBSTACLE_DISTANCE_DATA::NAME, OBSTACLE_DISTANCE_DATA::ID),
35582            (ODOMETRY_DATA::NAME, ODOMETRY_DATA::ID),
35583            (
35584                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME,
35585                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID,
35586            ),
35587            (
35588                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME,
35589                TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
35590            ),
35591            (CELLULAR_STATUS_DATA::NAME, CELLULAR_STATUS_DATA::ID),
35592            (ISBD_LINK_STATUS_DATA::NAME, ISBD_LINK_STATUS_DATA::ID),
35593            (CELLULAR_CONFIG_DATA::NAME, CELLULAR_CONFIG_DATA::ID),
35594            (RAW_RPM_DATA::NAME, RAW_RPM_DATA::ID),
35595            (UTM_GLOBAL_POSITION_DATA::NAME, UTM_GLOBAL_POSITION_DATA::ID),
35596            (DEBUG_FLOAT_ARRAY_DATA::NAME, DEBUG_FLOAT_ARRAY_DATA::ID),
35597            (
35598                ORBIT_EXECUTION_STATUS_DATA::NAME,
35599                ORBIT_EXECUTION_STATUS_DATA::ID,
35600            ),
35601            (SMART_BATTERY_INFO_DATA::NAME, SMART_BATTERY_INFO_DATA::ID),
35602            (FUEL_STATUS_DATA::NAME, FUEL_STATUS_DATA::ID),
35603            (BATTERY_INFO_DATA::NAME, BATTERY_INFO_DATA::ID),
35604            (GENERATOR_STATUS_DATA::NAME, GENERATOR_STATUS_DATA::ID),
35605            (
35606                ACTUATOR_OUTPUT_STATUS_DATA::NAME,
35607                ACTUATOR_OUTPUT_STATUS_DATA::ID,
35608            ),
35609            (
35610                TIME_ESTIMATE_TO_TARGET_DATA::NAME,
35611                TIME_ESTIMATE_TO_TARGET_DATA::ID,
35612            ),
35613            (TUNNEL_DATA::NAME, TUNNEL_DATA::ID),
35614            (CAN_FRAME_DATA::NAME, CAN_FRAME_DATA::ID),
35615            (CANFD_FRAME_DATA::NAME, CANFD_FRAME_DATA::ID),
35616            (CAN_FILTER_MODIFY_DATA::NAME, CAN_FILTER_MODIFY_DATA::ID),
35617            (
35618                ONBOARD_COMPUTER_STATUS_DATA::NAME,
35619                ONBOARD_COMPUTER_STATUS_DATA::ID,
35620            ),
35621            (
35622                COMPONENT_INFORMATION_DATA::NAME,
35623                COMPONENT_INFORMATION_DATA::ID,
35624            ),
35625            (
35626                COMPONENT_INFORMATION_BASIC_DATA::NAME,
35627                COMPONENT_INFORMATION_BASIC_DATA::ID,
35628            ),
35629            (COMPONENT_METADATA_DATA::NAME, COMPONENT_METADATA_DATA::ID),
35630            (PLAY_TUNE_V2_DATA::NAME, PLAY_TUNE_V2_DATA::ID),
35631            (SUPPORTED_TUNES_DATA::NAME, SUPPORTED_TUNES_DATA::ID),
35632            (EVENT_DATA::NAME, EVENT_DATA::ID),
35633            (
35634                CURRENT_EVENT_SEQUENCE_DATA::NAME,
35635                CURRENT_EVENT_SEQUENCE_DATA::ID,
35636            ),
35637            (REQUEST_EVENT_DATA::NAME, REQUEST_EVENT_DATA::ID),
35638            (
35639                RESPONSE_EVENT_ERROR_DATA::NAME,
35640                RESPONSE_EVENT_ERROR_DATA::ID,
35641            ),
35642            (AVAILABLE_MODES_DATA::NAME, AVAILABLE_MODES_DATA::ID),
35643            (CURRENT_MODE_DATA::NAME, CURRENT_MODE_DATA::ID),
35644            (
35645                AVAILABLE_MODES_MONITOR_DATA::NAME,
35646                AVAILABLE_MODES_MONITOR_DATA::ID,
35647            ),
35648            (ILLUMINATOR_STATUS_DATA::NAME, ILLUMINATOR_STATUS_DATA::ID),
35649            (SENS_POWER_DATA::NAME, SENS_POWER_DATA::ID),
35650            (SENS_MPPT_DATA::NAME, SENS_MPPT_DATA::ID),
35651            (ASLCTRL_DATA_DATA::NAME, ASLCTRL_DATA_DATA::ID),
35652            (ASLCTRL_DEBUG_DATA::NAME, ASLCTRL_DEBUG_DATA::ID),
35653            (ASLUAV_STATUS_DATA::NAME, ASLUAV_STATUS_DATA::ID),
35654            (EKF_EXT_DATA::NAME, EKF_EXT_DATA::ID),
35655            (ASL_OBCTRL_DATA::NAME, ASL_OBCTRL_DATA::ID),
35656            (SENS_ATMOS_DATA::NAME, SENS_ATMOS_DATA::ID),
35657            (SENS_BATMON_DATA::NAME, SENS_BATMON_DATA::ID),
35658            (FW_SOARING_DATA_DATA::NAME, FW_SOARING_DATA_DATA::ID),
35659            (SENSORPOD_STATUS_DATA::NAME, SENSORPOD_STATUS_DATA::ID),
35660            (SENS_POWER_BOARD_DATA::NAME, SENS_POWER_BOARD_DATA::ID),
35661            (GSM_LINK_STATUS_DATA::NAME, GSM_LINK_STATUS_DATA::ID),
35662            (SATCOM_LINK_STATUS_DATA::NAME, SATCOM_LINK_STATUS_DATA::ID),
35663            (
35664                SENSOR_AIRFLOW_ANGLES_DATA::NAME,
35665                SENSOR_AIRFLOW_ANGLES_DATA::ID,
35666            ),
35667            (WHEEL_DISTANCE_DATA::NAME, WHEEL_DISTANCE_DATA::ID),
35668            (WINCH_STATUS_DATA::NAME, WINCH_STATUS_DATA::ID),
35669            (
35670                OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
35671                OPEN_DRONE_ID_BASIC_ID_DATA::ID,
35672            ),
35673            (
35674                OPEN_DRONE_ID_LOCATION_DATA::NAME,
35675                OPEN_DRONE_ID_LOCATION_DATA::ID,
35676            ),
35677            (
35678                OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
35679                OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
35680            ),
35681            (
35682                OPEN_DRONE_ID_SELF_ID_DATA::NAME,
35683                OPEN_DRONE_ID_SELF_ID_DATA::ID,
35684            ),
35685            (
35686                OPEN_DRONE_ID_SYSTEM_DATA::NAME,
35687                OPEN_DRONE_ID_SYSTEM_DATA::ID,
35688            ),
35689            (
35690                OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
35691                OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
35692            ),
35693            (
35694                OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
35695                OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
35696            ),
35697            (
35698                OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
35699                OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
35700            ),
35701            (
35702                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
35703                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
35704            ),
35705            (HYGROMETER_SENSOR_DATA::NAME, HYGROMETER_SENSOR_DATA::ID),
35706        ]
35707    }
35708}
35709impl Message for MavMessage {
35710    fn parse(
35711        version: MavlinkVersion,
35712        id: u32,
35713        payload: &[u8],
35714    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35715        match id {
35716            ACTUATOR_CONTROL_TARGET_DATA::ID => {
35717                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
35718                    .map(Self::ACTUATOR_CONTROL_TARGET)
35719            }
35720            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
35721                .map(Self::ACTUATOR_OUTPUT_STATUS),
35722            ADSB_VEHICLE_DATA::ID => {
35723                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
35724            }
35725            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
35726            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
35727            ASLCTRL_DATA_DATA::ID => {
35728                ASLCTRL_DATA_DATA::deser(version, payload).map(Self::ASLCTRL_DATA)
35729            }
35730            ASLCTRL_DEBUG_DATA::ID => {
35731                ASLCTRL_DEBUG_DATA::deser(version, payload).map(Self::ASLCTRL_DEBUG)
35732            }
35733            ASLUAV_STATUS_DATA::ID => {
35734                ASLUAV_STATUS_DATA::deser(version, payload).map(Self::ASLUAV_STATUS)
35735            }
35736            ASL_OBCTRL_DATA::ID => ASL_OBCTRL_DATA::deser(version, payload).map(Self::ASL_OBCTRL),
35737            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
35738            ATTITUDE_QUATERNION_DATA::ID => {
35739                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
35740            }
35741            ATTITUDE_QUATERNION_COV_DATA::ID => {
35742                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
35743                    .map(Self::ATTITUDE_QUATERNION_COV)
35744            }
35745            ATTITUDE_TARGET_DATA::ID => {
35746                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
35747            }
35748            ATT_POS_MOCAP_DATA::ID => {
35749                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
35750            }
35751            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
35752            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35753                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
35754                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
35755            }
35756            AUTOPILOT_VERSION_DATA::ID => {
35757                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
35758            }
35759            AVAILABLE_MODES_DATA::ID => {
35760                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
35761            }
35762            AVAILABLE_MODES_MONITOR_DATA::ID => {
35763                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
35764                    .map(Self::AVAILABLE_MODES_MONITOR)
35765            }
35766            BATTERY_INFO_DATA::ID => {
35767                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
35768            }
35769            BATTERY_STATUS_DATA::ID => {
35770                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
35771            }
35772            BUTTON_CHANGE_DATA::ID => {
35773                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
35774            }
35775            CAMERA_CAPTURE_STATUS_DATA::ID => {
35776                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
35777            }
35778            CAMERA_FOV_STATUS_DATA::ID => {
35779                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
35780            }
35781            CAMERA_IMAGE_CAPTURED_DATA::ID => {
35782                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
35783            }
35784            CAMERA_INFORMATION_DATA::ID => {
35785                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
35786            }
35787            CAMERA_SETTINGS_DATA::ID => {
35788                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
35789            }
35790            CAMERA_THERMAL_RANGE_DATA::ID => {
35791                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
35792            }
35793            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
35794                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
35795                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
35796            }
35797            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
35798                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
35799                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
35800            }
35801            CAMERA_TRIGGER_DATA::ID => {
35802                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
35803            }
35804            CANFD_FRAME_DATA::ID => {
35805                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
35806            }
35807            CAN_FILTER_MODIFY_DATA::ID => {
35808                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
35809            }
35810            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
35811            CELLULAR_CONFIG_DATA::ID => {
35812                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
35813            }
35814            CELLULAR_STATUS_DATA::ID => {
35815                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
35816            }
35817            CHANGE_OPERATOR_CONTROL_DATA::ID => {
35818                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
35819                    .map(Self::CHANGE_OPERATOR_CONTROL)
35820            }
35821            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
35822                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
35823                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
35824            }
35825            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
35826            COMMAND_ACK_DATA::ID => {
35827                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
35828            }
35829            COMMAND_CANCEL_DATA::ID => {
35830                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
35831            }
35832            COMMAND_INT_DATA::ID => {
35833                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
35834            }
35835            COMMAND_INT_STAMPED_DATA::ID => {
35836                COMMAND_INT_STAMPED_DATA::deser(version, payload).map(Self::COMMAND_INT_STAMPED)
35837            }
35838            COMMAND_LONG_DATA::ID => {
35839                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
35840            }
35841            COMMAND_LONG_STAMPED_DATA::ID => {
35842                COMMAND_LONG_STAMPED_DATA::deser(version, payload).map(Self::COMMAND_LONG_STAMPED)
35843            }
35844            COMPONENT_INFORMATION_DATA::ID => {
35845                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
35846            }
35847            COMPONENT_INFORMATION_BASIC_DATA::ID => {
35848                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
35849                    .map(Self::COMPONENT_INFORMATION_BASIC)
35850            }
35851            COMPONENT_METADATA_DATA::ID => {
35852                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
35853            }
35854            CONTROL_SYSTEM_STATE_DATA::ID => {
35855                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
35856            }
35857            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
35858                .map(Self::CURRENT_EVENT_SEQUENCE),
35859            CURRENT_MODE_DATA::ID => {
35860                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
35861            }
35862            DATA_STREAM_DATA::ID => {
35863                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
35864            }
35865            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
35866                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
35867                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
35868            }
35869            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
35870            DEBUG_FLOAT_ARRAY_DATA::ID => {
35871                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
35872            }
35873            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
35874            DISTANCE_SENSOR_DATA::ID => {
35875                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
35876            }
35877            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
35878            EKF_EXT_DATA::ID => EKF_EXT_DATA::deser(version, payload).map(Self::EKF_EXT),
35879            ENCAPSULATED_DATA_DATA::ID => {
35880                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
35881            }
35882            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
35883            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
35884            ESTIMATOR_STATUS_DATA::ID => {
35885                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
35886            }
35887            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
35888            EXTENDED_SYS_STATE_DATA::ID => {
35889                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
35890            }
35891            FENCE_STATUS_DATA::ID => {
35892                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
35893            }
35894            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
35895                .map(Self::FILE_TRANSFER_PROTOCOL),
35896            FLIGHT_INFORMATION_DATA::ID => {
35897                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
35898            }
35899            FOLLOW_TARGET_DATA::ID => {
35900                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
35901            }
35902            FUEL_STATUS_DATA::ID => {
35903                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
35904            }
35905            FW_SOARING_DATA_DATA::ID => {
35906                FW_SOARING_DATA_DATA::deser(version, payload).map(Self::FW_SOARING_DATA)
35907            }
35908            GENERATOR_STATUS_DATA::ID => {
35909                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
35910            }
35911            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
35912                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
35913                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
35914            }
35915            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
35916                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
35917                    .map(Self::GIMBAL_DEVICE_INFORMATION)
35918            }
35919            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
35920                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
35921                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
35922            }
35923            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
35924                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
35925                    .map(Self::GIMBAL_MANAGER_INFORMATION)
35926            }
35927            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
35928                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
35929                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
35930            }
35931            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35932                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
35933                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
35934            }
35935            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
35936                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
35937                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
35938            }
35939            GIMBAL_MANAGER_STATUS_DATA::ID => {
35940                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
35941            }
35942            GLOBAL_POSITION_INT_DATA::ID => {
35943                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
35944            }
35945            GLOBAL_POSITION_INT_COV_DATA::ID => {
35946                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
35947                    .map(Self::GLOBAL_POSITION_INT_COV)
35948            }
35949            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35950                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
35951                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
35952            }
35953            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
35954            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
35955            GPS_GLOBAL_ORIGIN_DATA::ID => {
35956                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
35957            }
35958            GPS_INJECT_DATA_DATA::ID => {
35959                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
35960            }
35961            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
35962            GPS_RAW_INT_DATA::ID => {
35963                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
35964            }
35965            GPS_RTCM_DATA_DATA::ID => {
35966                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
35967            }
35968            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
35969            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
35970            GSM_LINK_STATUS_DATA::ID => {
35971                GSM_LINK_STATUS_DATA::deser(version, payload).map(Self::GSM_LINK_STATUS)
35972            }
35973            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
35974            HIGHRES_IMU_DATA::ID => {
35975                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
35976            }
35977            HIGH_LATENCY_DATA::ID => {
35978                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
35979            }
35980            HIGH_LATENCY2_DATA::ID => {
35981                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
35982            }
35983            HIL_ACTUATOR_CONTROLS_DATA::ID => {
35984                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
35985            }
35986            HIL_CONTROLS_DATA::ID => {
35987                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
35988            }
35989            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
35990            HIL_OPTICAL_FLOW_DATA::ID => {
35991                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
35992            }
35993            HIL_RC_INPUTS_RAW_DATA::ID => {
35994                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
35995            }
35996            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
35997            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
35998            HIL_STATE_QUATERNION_DATA::ID => {
35999                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
36000            }
36001            HOME_POSITION_DATA::ID => {
36002                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
36003            }
36004            HYGROMETER_SENSOR_DATA::ID => {
36005                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
36006            }
36007            ILLUMINATOR_STATUS_DATA::ID => {
36008                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
36009            }
36010            ISBD_LINK_STATUS_DATA::ID => {
36011                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
36012            }
36013            LANDING_TARGET_DATA::ID => {
36014                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
36015            }
36016            LINK_NODE_STATUS_DATA::ID => {
36017                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
36018            }
36019            LOCAL_POSITION_NED_DATA::ID => {
36020                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
36021            }
36022            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
36023                .map(Self::LOCAL_POSITION_NED_COV),
36024            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36025                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
36026                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
36027            }
36028            LOGGING_ACK_DATA::ID => {
36029                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
36030            }
36031            LOGGING_DATA_DATA::ID => {
36032                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
36033            }
36034            LOGGING_DATA_ACKED_DATA::ID => {
36035                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
36036            }
36037            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
36038            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
36039            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
36040            LOG_REQUEST_DATA_DATA::ID => {
36041                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
36042            }
36043            LOG_REQUEST_END_DATA::ID => {
36044                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
36045            }
36046            LOG_REQUEST_LIST_DATA::ID => {
36047                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
36048            }
36049            MAG_CAL_REPORT_DATA::ID => {
36050                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
36051            }
36052            MANUAL_CONTROL_DATA::ID => {
36053                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
36054            }
36055            MANUAL_SETPOINT_DATA::ID => {
36056                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
36057            }
36058            MEMORY_VECT_DATA::ID => {
36059                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
36060            }
36061            MESSAGE_INTERVAL_DATA::ID => {
36062                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
36063            }
36064            MISSION_ACK_DATA::ID => {
36065                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
36066            }
36067            MISSION_CLEAR_ALL_DATA::ID => {
36068                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
36069            }
36070            MISSION_COUNT_DATA::ID => {
36071                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
36072            }
36073            MISSION_CURRENT_DATA::ID => {
36074                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
36075            }
36076            MISSION_ITEM_DATA::ID => {
36077                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
36078            }
36079            MISSION_ITEM_INT_DATA::ID => {
36080                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
36081            }
36082            MISSION_ITEM_REACHED_DATA::ID => {
36083                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
36084            }
36085            MISSION_REQUEST_DATA::ID => {
36086                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
36087            }
36088            MISSION_REQUEST_INT_DATA::ID => {
36089                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
36090            }
36091            MISSION_REQUEST_LIST_DATA::ID => {
36092                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
36093            }
36094            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
36095                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
36096                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
36097            }
36098            MISSION_SET_CURRENT_DATA::ID => {
36099                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
36100            }
36101            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
36102                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
36103                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
36104            }
36105            MOUNT_ORIENTATION_DATA::ID => {
36106                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
36107            }
36108            NAMED_VALUE_FLOAT_DATA::ID => {
36109                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
36110            }
36111            NAMED_VALUE_INT_DATA::ID => {
36112                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
36113            }
36114            NAV_CONTROLLER_OUTPUT_DATA::ID => {
36115                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
36116            }
36117            OBSTACLE_DISTANCE_DATA::ID => {
36118                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
36119            }
36120            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
36121            ONBOARD_COMPUTER_STATUS_DATA::ID => {
36122                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
36123                    .map(Self::ONBOARD_COMPUTER_STATUS)
36124            }
36125            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
36126                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
36127                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
36128            }
36129            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
36130                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
36131                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
36132            }
36133            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
36134                .map(Self::OPEN_DRONE_ID_BASIC_ID),
36135            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
36136                .map(Self::OPEN_DRONE_ID_LOCATION),
36137            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
36138                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
36139                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
36140            }
36141            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
36142                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
36143                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
36144            }
36145            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
36146                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
36147            }
36148            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
36149                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
36150            }
36151            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
36152                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
36153                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
36154            }
36155            OPTICAL_FLOW_DATA::ID => {
36156                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
36157            }
36158            OPTICAL_FLOW_RAD_DATA::ID => {
36159                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
36160            }
36161            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
36162                .map(Self::ORBIT_EXECUTION_STATUS),
36163            PARAM_EXT_ACK_DATA::ID => {
36164                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
36165            }
36166            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
36167                .map(Self::PARAM_EXT_REQUEST_LIST),
36168            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
36169                .map(Self::PARAM_EXT_REQUEST_READ),
36170            PARAM_EXT_SET_DATA::ID => {
36171                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
36172            }
36173            PARAM_EXT_VALUE_DATA::ID => {
36174                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
36175            }
36176            PARAM_MAP_RC_DATA::ID => {
36177                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
36178            }
36179            PARAM_REQUEST_LIST_DATA::ID => {
36180                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
36181            }
36182            PARAM_REQUEST_READ_DATA::ID => {
36183                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
36184            }
36185            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
36186            PARAM_VALUE_DATA::ID => {
36187                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
36188            }
36189            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
36190            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
36191            PLAY_TUNE_V2_DATA::ID => {
36192                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
36193            }
36194            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36195                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
36196                    .map(Self::POSITION_TARGET_GLOBAL_INT)
36197            }
36198            POSITION_TARGET_LOCAL_NED_DATA::ID => {
36199                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
36200                    .map(Self::POSITION_TARGET_LOCAL_NED)
36201            }
36202            POWER_STATUS_DATA::ID => {
36203                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
36204            }
36205            PROTOCOL_VERSION_DATA::ID => {
36206                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
36207            }
36208            RADIO_STATUS_DATA::ID => {
36209                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
36210            }
36211            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
36212            RAW_PRESSURE_DATA::ID => {
36213                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
36214            }
36215            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
36216            RC_CHANNELS_DATA::ID => {
36217                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
36218            }
36219            RC_CHANNELS_OVERRIDE_DATA::ID => {
36220                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
36221            }
36222            RC_CHANNELS_RAW_DATA::ID => {
36223                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
36224            }
36225            RC_CHANNELS_SCALED_DATA::ID => {
36226                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
36227            }
36228            REQUEST_DATA_STREAM_DATA::ID => {
36229                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
36230            }
36231            REQUEST_EVENT_DATA::ID => {
36232                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
36233            }
36234            RESOURCE_REQUEST_DATA::ID => {
36235                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
36236            }
36237            RESPONSE_EVENT_ERROR_DATA::ID => {
36238                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
36239            }
36240            SAFETY_ALLOWED_AREA_DATA::ID => {
36241                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
36242            }
36243            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
36244                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
36245                    .map(Self::SAFETY_SET_ALLOWED_AREA)
36246            }
36247            SATCOM_LINK_STATUS_DATA::ID => {
36248                SATCOM_LINK_STATUS_DATA::deser(version, payload).map(Self::SATCOM_LINK_STATUS)
36249            }
36250            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
36251            SCALED_IMU2_DATA::ID => {
36252                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
36253            }
36254            SCALED_IMU3_DATA::ID => {
36255                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
36256            }
36257            SCALED_PRESSURE_DATA::ID => {
36258                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
36259            }
36260            SCALED_PRESSURE2_DATA::ID => {
36261                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
36262            }
36263            SCALED_PRESSURE3_DATA::ID => {
36264                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
36265            }
36266            SENSORPOD_STATUS_DATA::ID => {
36267                SENSORPOD_STATUS_DATA::deser(version, payload).map(Self::SENSORPOD_STATUS)
36268            }
36269            SENSOR_AIRFLOW_ANGLES_DATA::ID => {
36270                SENSOR_AIRFLOW_ANGLES_DATA::deser(version, payload).map(Self::SENSOR_AIRFLOW_ANGLES)
36271            }
36272            SENS_ATMOS_DATA::ID => SENS_ATMOS_DATA::deser(version, payload).map(Self::SENS_ATMOS),
36273            SENS_BATMON_DATA::ID => {
36274                SENS_BATMON_DATA::deser(version, payload).map(Self::SENS_BATMON)
36275            }
36276            SENS_MPPT_DATA::ID => SENS_MPPT_DATA::deser(version, payload).map(Self::SENS_MPPT),
36277            SENS_POWER_DATA::ID => SENS_POWER_DATA::deser(version, payload).map(Self::SENS_POWER),
36278            SENS_POWER_BOARD_DATA::ID => {
36279                SENS_POWER_BOARD_DATA::deser(version, payload).map(Self::SENS_POWER_BOARD)
36280            }
36281            SERIAL_CONTROL_DATA::ID => {
36282                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
36283            }
36284            SERVO_OUTPUT_RAW_DATA::ID => {
36285                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
36286            }
36287            SETUP_SIGNING_DATA::ID => {
36288                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
36289            }
36290            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
36291                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
36292                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
36293            }
36294            SET_ATTITUDE_TARGET_DATA::ID => {
36295                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
36296            }
36297            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
36298                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
36299            }
36300            SET_HOME_POSITION_DATA::ID => {
36301                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
36302            }
36303            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
36304            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36305                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
36306                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
36307            }
36308            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
36309                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
36310                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
36311            }
36312            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
36313            SMART_BATTERY_INFO_DATA::ID => {
36314                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
36315            }
36316            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
36317            STORAGE_INFORMATION_DATA::ID => {
36318                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
36319            }
36320            SUPPORTED_TUNES_DATA::ID => {
36321                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
36322            }
36323            SYSTEM_TIME_DATA::ID => {
36324                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
36325            }
36326            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
36327            TERRAIN_CHECK_DATA::ID => {
36328                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
36329            }
36330            TERRAIN_DATA_DATA::ID => {
36331                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
36332            }
36333            TERRAIN_REPORT_DATA::ID => {
36334                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
36335            }
36336            TERRAIN_REQUEST_DATA::ID => {
36337                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
36338            }
36339            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
36340            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
36341                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
36342                    .map(Self::TIME_ESTIMATE_TO_TARGET)
36343            }
36344            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36345                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
36346                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
36347            }
36348            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36349                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
36350                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
36351            }
36352            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
36353            UAVCAN_NODE_INFO_DATA::ID => {
36354                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
36355            }
36356            UAVCAN_NODE_STATUS_DATA::ID => {
36357                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
36358            }
36359            UTM_GLOBAL_POSITION_DATA::ID => {
36360                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
36361            }
36362            V2_EXTENSION_DATA::ID => {
36363                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
36364            }
36365            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
36366            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
36367            VICON_POSITION_ESTIMATE_DATA::ID => {
36368                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
36369                    .map(Self::VICON_POSITION_ESTIMATE)
36370            }
36371            VIDEO_STREAM_INFORMATION_DATA::ID => {
36372                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
36373                    .map(Self::VIDEO_STREAM_INFORMATION)
36374            }
36375            VIDEO_STREAM_STATUS_DATA::ID => {
36376                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
36377            }
36378            VISION_POSITION_ESTIMATE_DATA::ID => {
36379                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
36380                    .map(Self::VISION_POSITION_ESTIMATE)
36381            }
36382            VISION_SPEED_ESTIMATE_DATA::ID => {
36383                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
36384            }
36385            WHEEL_DISTANCE_DATA::ID => {
36386                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
36387            }
36388            WIFI_CONFIG_AP_DATA::ID => {
36389                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
36390            }
36391            WINCH_STATUS_DATA::ID => {
36392                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
36393            }
36394            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
36395            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
36396        }
36397    }
36398    fn message_name(&self) -> &'static str {
36399        match self {
36400            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
36401            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
36402            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
36403            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
36404            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
36405            Self::ASLCTRL_DATA(..) => ASLCTRL_DATA_DATA::NAME,
36406            Self::ASLCTRL_DEBUG(..) => ASLCTRL_DEBUG_DATA::NAME,
36407            Self::ASLUAV_STATUS(..) => ASLUAV_STATUS_DATA::NAME,
36408            Self::ASL_OBCTRL(..) => ASL_OBCTRL_DATA::NAME,
36409            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
36410            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
36411            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
36412            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
36413            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
36414            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
36415            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
36416                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
36417            }
36418            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
36419            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
36420            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
36421            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
36422            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
36423            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
36424            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
36425            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
36426            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
36427            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
36428            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
36429            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
36430            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
36431            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
36432            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
36433            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
36434            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
36435            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
36436            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
36437            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
36438            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
36439            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
36440            Self::COLLISION(..) => COLLISION_DATA::NAME,
36441            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
36442            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
36443            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
36444            Self::COMMAND_INT_STAMPED(..) => COMMAND_INT_STAMPED_DATA::NAME,
36445            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
36446            Self::COMMAND_LONG_STAMPED(..) => COMMAND_LONG_STAMPED_DATA::NAME,
36447            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
36448            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
36449            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
36450            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
36451            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
36452            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
36453            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
36454            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
36455            Self::DEBUG(..) => DEBUG_DATA::NAME,
36456            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
36457            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
36458            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
36459            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
36460            Self::EKF_EXT(..) => EKF_EXT_DATA::NAME,
36461            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
36462            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
36463            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
36464            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
36465            Self::EVENT(..) => EVENT_DATA::NAME,
36466            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
36467            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
36468            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
36469            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
36470            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
36471            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
36472            Self::FW_SOARING_DATA(..) => FW_SOARING_DATA_DATA::NAME,
36473            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
36474            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
36475            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
36476            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
36477            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
36478            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
36479            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
36480                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
36481            }
36482            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
36483            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
36484            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
36485            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
36486            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
36487            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
36488            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
36489            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
36490            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
36491            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
36492            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
36493            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
36494            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
36495            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
36496            Self::GSM_LINK_STATUS(..) => GSM_LINK_STATUS_DATA::NAME,
36497            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
36498            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
36499            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
36500            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
36501            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
36502            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
36503            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
36504            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
36505            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
36506            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
36507            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
36508            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
36509            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
36510            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
36511            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
36512            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
36513            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
36514            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
36515            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
36516            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
36517            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
36518                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
36519            }
36520            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
36521            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
36522            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
36523            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
36524            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
36525            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
36526            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
36527            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
36528            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
36529            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
36530            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
36531            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
36532            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
36533            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
36534            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
36535            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
36536            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
36537            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
36538            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
36539            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
36540            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
36541            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
36542            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
36543            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
36544            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
36545            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
36546            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
36547            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
36548            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
36549            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
36550            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
36551            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
36552            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
36553            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
36554            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
36555            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
36556            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
36557            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
36558            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
36559            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
36560            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
36561            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
36562            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
36563            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
36564            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
36565            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
36566            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
36567            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
36568            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
36569            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
36570            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
36571            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
36572            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
36573            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
36574            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
36575            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
36576            Self::PING(..) => PING_DATA::NAME,
36577            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
36578            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
36579            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
36580            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
36581            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
36582            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
36583            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
36584            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
36585            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
36586            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
36587            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
36588            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
36589            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
36590            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
36591            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
36592            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
36593            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
36594            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
36595            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
36596            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
36597            Self::SATCOM_LINK_STATUS(..) => SATCOM_LINK_STATUS_DATA::NAME,
36598            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
36599            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
36600            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
36601            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
36602            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
36603            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
36604            Self::SENSORPOD_STATUS(..) => SENSORPOD_STATUS_DATA::NAME,
36605            Self::SENSOR_AIRFLOW_ANGLES(..) => SENSOR_AIRFLOW_ANGLES_DATA::NAME,
36606            Self::SENS_ATMOS(..) => SENS_ATMOS_DATA::NAME,
36607            Self::SENS_BATMON(..) => SENS_BATMON_DATA::NAME,
36608            Self::SENS_MPPT(..) => SENS_MPPT_DATA::NAME,
36609            Self::SENS_POWER(..) => SENS_POWER_DATA::NAME,
36610            Self::SENS_POWER_BOARD(..) => SENS_POWER_BOARD_DATA::NAME,
36611            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
36612            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
36613            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
36614            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
36615            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
36616            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
36617            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
36618            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
36619            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
36620            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
36621            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
36622            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
36623            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
36624            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
36625            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
36626            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
36627            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
36628            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
36629            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
36630            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
36631            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
36632            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
36633            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
36634            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
36635                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
36636            }
36637            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
36638                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
36639            }
36640            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
36641            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
36642            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
36643            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
36644            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
36645            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
36646            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
36647            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
36648            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
36649            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
36650            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
36651            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
36652            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
36653            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
36654            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
36655            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
36656        }
36657    }
36658    fn message_id(&self) -> u32 {
36659        match self {
36660            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
36661            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
36662            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
36663            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
36664            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
36665            Self::ASLCTRL_DATA(..) => ASLCTRL_DATA_DATA::ID,
36666            Self::ASLCTRL_DEBUG(..) => ASLCTRL_DEBUG_DATA::ID,
36667            Self::ASLUAV_STATUS(..) => ASLUAV_STATUS_DATA::ID,
36668            Self::ASL_OBCTRL(..) => ASL_OBCTRL_DATA::ID,
36669            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
36670            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
36671            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
36672            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
36673            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
36674            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
36675            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
36676                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
36677            }
36678            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
36679            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
36680            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
36681            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
36682            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
36683            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
36684            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
36685            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
36686            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
36687            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
36688            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
36689            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
36690            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
36691            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
36692            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
36693            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
36694            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
36695            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
36696            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
36697            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
36698            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
36699            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
36700            Self::COLLISION(..) => COLLISION_DATA::ID,
36701            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
36702            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
36703            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
36704            Self::COMMAND_INT_STAMPED(..) => COMMAND_INT_STAMPED_DATA::ID,
36705            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
36706            Self::COMMAND_LONG_STAMPED(..) => COMMAND_LONG_STAMPED_DATA::ID,
36707            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
36708            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
36709            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
36710            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
36711            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
36712            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
36713            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
36714            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
36715            Self::DEBUG(..) => DEBUG_DATA::ID,
36716            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
36717            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
36718            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
36719            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
36720            Self::EKF_EXT(..) => EKF_EXT_DATA::ID,
36721            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
36722            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
36723            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
36724            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
36725            Self::EVENT(..) => EVENT_DATA::ID,
36726            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
36727            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
36728            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
36729            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
36730            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
36731            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
36732            Self::FW_SOARING_DATA(..) => FW_SOARING_DATA_DATA::ID,
36733            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
36734            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
36735            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
36736            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
36737            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
36738            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
36739            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
36740                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
36741            }
36742            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
36743            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
36744            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
36745            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
36746            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
36747            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
36748            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
36749            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
36750            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
36751            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
36752            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
36753            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
36754            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
36755            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
36756            Self::GSM_LINK_STATUS(..) => GSM_LINK_STATUS_DATA::ID,
36757            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
36758            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
36759            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
36760            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
36761            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
36762            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
36763            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
36764            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
36765            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
36766            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
36767            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
36768            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
36769            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
36770            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
36771            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
36772            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
36773            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
36774            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
36775            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
36776            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
36777            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
36778                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
36779            }
36780            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
36781            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
36782            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
36783            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
36784            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
36785            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
36786            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
36787            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
36788            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
36789            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
36790            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
36791            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
36792            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
36793            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
36794            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
36795            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
36796            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
36797            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
36798            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
36799            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
36800            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
36801            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
36802            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
36803            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
36804            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
36805            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
36806            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
36807            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
36808            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
36809            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
36810            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
36811            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
36812            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
36813            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
36814            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
36815            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
36816            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
36817            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
36818            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
36819            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
36820            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
36821            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
36822            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
36823            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
36824            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
36825            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
36826            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
36827            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
36828            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
36829            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
36830            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
36831            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
36832            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
36833            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
36834            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
36835            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
36836            Self::PING(..) => PING_DATA::ID,
36837            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
36838            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
36839            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
36840            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
36841            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
36842            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
36843            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
36844            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
36845            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
36846            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
36847            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
36848            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
36849            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
36850            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
36851            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
36852            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
36853            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
36854            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
36855            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
36856            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
36857            Self::SATCOM_LINK_STATUS(..) => SATCOM_LINK_STATUS_DATA::ID,
36858            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
36859            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
36860            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
36861            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
36862            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
36863            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
36864            Self::SENSORPOD_STATUS(..) => SENSORPOD_STATUS_DATA::ID,
36865            Self::SENSOR_AIRFLOW_ANGLES(..) => SENSOR_AIRFLOW_ANGLES_DATA::ID,
36866            Self::SENS_ATMOS(..) => SENS_ATMOS_DATA::ID,
36867            Self::SENS_BATMON(..) => SENS_BATMON_DATA::ID,
36868            Self::SENS_MPPT(..) => SENS_MPPT_DATA::ID,
36869            Self::SENS_POWER(..) => SENS_POWER_DATA::ID,
36870            Self::SENS_POWER_BOARD(..) => SENS_POWER_BOARD_DATA::ID,
36871            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
36872            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
36873            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
36874            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
36875            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
36876            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
36877            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
36878            Self::SET_MODE(..) => SET_MODE_DATA::ID,
36879            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
36880            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
36881            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
36882            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
36883            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
36884            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
36885            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
36886            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
36887            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
36888            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
36889            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
36890            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
36891            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
36892            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
36893            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
36894            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
36895            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
36896                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
36897            }
36898            Self::TUNNEL(..) => TUNNEL_DATA::ID,
36899            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
36900            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
36901            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
36902            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
36903            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
36904            Self::VIBRATION(..) => VIBRATION_DATA::ID,
36905            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
36906            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
36907            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
36908            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
36909            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
36910            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
36911            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
36912            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
36913            Self::WIND_COV(..) => WIND_COV_DATA::ID,
36914        }
36915    }
36916    fn message_id_from_name(name: &str) -> Option<u32> {
36917        match name {
36918            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
36919            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
36920            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
36921            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
36922            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
36923            ASLCTRL_DATA_DATA::NAME => Some(ASLCTRL_DATA_DATA::ID),
36924            ASLCTRL_DEBUG_DATA::NAME => Some(ASLCTRL_DEBUG_DATA::ID),
36925            ASLUAV_STATUS_DATA::NAME => Some(ASLUAV_STATUS_DATA::ID),
36926            ASL_OBCTRL_DATA::NAME => Some(ASL_OBCTRL_DATA::ID),
36927            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
36928            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
36929            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
36930            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
36931            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
36932            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
36933            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
36934                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
36935            }
36936            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
36937            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
36938            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
36939            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
36940            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
36941            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
36942            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
36943            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
36944            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
36945            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
36946            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
36947            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
36948            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
36949            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
36950            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
36951            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
36952            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
36953            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
36954            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
36955            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
36956            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
36957            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
36958            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
36959            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
36960            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
36961            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
36962            COMMAND_INT_STAMPED_DATA::NAME => Some(COMMAND_INT_STAMPED_DATA::ID),
36963            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
36964            COMMAND_LONG_STAMPED_DATA::NAME => Some(COMMAND_LONG_STAMPED_DATA::ID),
36965            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
36966            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
36967            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
36968            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
36969            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
36970            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
36971            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
36972            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
36973            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
36974            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
36975            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
36976            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
36977            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
36978            EKF_EXT_DATA::NAME => Some(EKF_EXT_DATA::ID),
36979            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
36980            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
36981            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
36982            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
36983            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
36984            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
36985            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
36986            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
36987            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
36988            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
36989            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
36990            FW_SOARING_DATA_DATA::NAME => Some(FW_SOARING_DATA_DATA::ID),
36991            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
36992            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
36993                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
36994            }
36995            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
36996            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
36997            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
36998            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
36999            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
37000                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
37001            }
37002            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
37003            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
37004            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
37005            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
37006            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
37007                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
37008            }
37009            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
37010            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
37011            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
37012            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
37013            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
37014            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
37015            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
37016            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
37017            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
37018            GSM_LINK_STATUS_DATA::NAME => Some(GSM_LINK_STATUS_DATA::ID),
37019            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
37020            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
37021            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
37022            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
37023            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
37024            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
37025            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
37026            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
37027            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
37028            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
37029            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
37030            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
37031            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
37032            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
37033            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
37034            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
37035            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
37036            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
37037            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
37038            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
37039            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
37040                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
37041            }
37042            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
37043            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
37044            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
37045            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
37046            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
37047            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
37048            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
37049            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
37050            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
37051            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
37052            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
37053            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
37054            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
37055            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
37056            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
37057            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
37058            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
37059            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
37060            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
37061            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
37062            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
37063            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
37064            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
37065            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
37066            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
37067            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
37068            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
37069            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
37070            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
37071            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
37072            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
37073            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
37074            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
37075            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
37076            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
37077            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
37078            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
37079            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
37080            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
37081            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
37082            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
37083            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
37084            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
37085            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
37086            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
37087            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
37088            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
37089            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
37090            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
37091            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
37092            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
37093            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
37094            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
37095            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
37096            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
37097            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
37098            PING_DATA::NAME => Some(PING_DATA::ID),
37099            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
37100            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
37101            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
37102            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
37103            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
37104            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
37105            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
37106            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
37107            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
37108            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
37109            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
37110            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
37111            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
37112            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
37113            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
37114            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
37115            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
37116            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
37117            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
37118            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
37119            SATCOM_LINK_STATUS_DATA::NAME => Some(SATCOM_LINK_STATUS_DATA::ID),
37120            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
37121            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
37122            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
37123            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
37124            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
37125            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
37126            SENSORPOD_STATUS_DATA::NAME => Some(SENSORPOD_STATUS_DATA::ID),
37127            SENSOR_AIRFLOW_ANGLES_DATA::NAME => Some(SENSOR_AIRFLOW_ANGLES_DATA::ID),
37128            SENS_ATMOS_DATA::NAME => Some(SENS_ATMOS_DATA::ID),
37129            SENS_BATMON_DATA::NAME => Some(SENS_BATMON_DATA::ID),
37130            SENS_MPPT_DATA::NAME => Some(SENS_MPPT_DATA::ID),
37131            SENS_POWER_DATA::NAME => Some(SENS_POWER_DATA::ID),
37132            SENS_POWER_BOARD_DATA::NAME => Some(SENS_POWER_BOARD_DATA::ID),
37133            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
37134            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
37135            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
37136            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
37137            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
37138            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
37139            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
37140            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
37141            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
37142                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
37143            }
37144            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
37145                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
37146            }
37147            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
37148            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
37149            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
37150            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
37151            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
37152            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
37153            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
37154            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
37155            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
37156            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
37157            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
37158            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
37159            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
37160            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
37161                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
37162            }
37163            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
37164                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
37165            }
37166            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
37167            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
37168            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
37169            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
37170            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
37171            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
37172            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
37173            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
37174            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
37175            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
37176            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
37177            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
37178            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
37179            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
37180            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
37181            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
37182            _ => None,
37183        }
37184    }
37185    fn default_message_from_id(id: u32) -> Option<Self> {
37186        match id {
37187            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
37188                ACTUATOR_CONTROL_TARGET_DATA::default(),
37189            )),
37190            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
37191                ACTUATOR_OUTPUT_STATUS_DATA::default(),
37192            )),
37193            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
37194            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
37195            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
37196            ASLCTRL_DATA_DATA::ID => Some(Self::ASLCTRL_DATA(ASLCTRL_DATA_DATA::default())),
37197            ASLCTRL_DEBUG_DATA::ID => Some(Self::ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA::default())),
37198            ASLUAV_STATUS_DATA::ID => Some(Self::ASLUAV_STATUS(ASLUAV_STATUS_DATA::default())),
37199            ASL_OBCTRL_DATA::ID => Some(Self::ASL_OBCTRL(ASL_OBCTRL_DATA::default())),
37200            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
37201            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
37202                ATTITUDE_QUATERNION_DATA::default(),
37203            )),
37204            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
37205                ATTITUDE_QUATERNION_COV_DATA::default(),
37206            )),
37207            ATTITUDE_TARGET_DATA::ID => {
37208                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
37209            }
37210            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
37211            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
37212            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37213                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
37214                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
37215                ))
37216            }
37217            AUTOPILOT_VERSION_DATA::ID => {
37218                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
37219            }
37220            AVAILABLE_MODES_DATA::ID => {
37221                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
37222            }
37223            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
37224                AVAILABLE_MODES_MONITOR_DATA::default(),
37225            )),
37226            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
37227            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
37228            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
37229            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
37230                CAMERA_CAPTURE_STATUS_DATA::default(),
37231            )),
37232            CAMERA_FOV_STATUS_DATA::ID => {
37233                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
37234            }
37235            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
37236                CAMERA_IMAGE_CAPTURED_DATA::default(),
37237            )),
37238            CAMERA_INFORMATION_DATA::ID => {
37239                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
37240            }
37241            CAMERA_SETTINGS_DATA::ID => {
37242                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
37243            }
37244            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
37245                CAMERA_THERMAL_RANGE_DATA::default(),
37246            )),
37247            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
37248                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
37249            )),
37250            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
37251                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
37252            )),
37253            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
37254            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
37255            CAN_FILTER_MODIFY_DATA::ID => {
37256                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
37257            }
37258            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
37259            CELLULAR_CONFIG_DATA::ID => {
37260                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
37261            }
37262            CELLULAR_STATUS_DATA::ID => {
37263                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
37264            }
37265            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
37266                CHANGE_OPERATOR_CONTROL_DATA::default(),
37267            )),
37268            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
37269                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
37270            )),
37271            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
37272            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
37273            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
37274            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
37275            COMMAND_INT_STAMPED_DATA::ID => Some(Self::COMMAND_INT_STAMPED(
37276                COMMAND_INT_STAMPED_DATA::default(),
37277            )),
37278            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
37279            COMMAND_LONG_STAMPED_DATA::ID => Some(Self::COMMAND_LONG_STAMPED(
37280                COMMAND_LONG_STAMPED_DATA::default(),
37281            )),
37282            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
37283                COMPONENT_INFORMATION_DATA::default(),
37284            )),
37285            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
37286                COMPONENT_INFORMATION_BASIC_DATA::default(),
37287            )),
37288            COMPONENT_METADATA_DATA::ID => {
37289                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
37290            }
37291            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
37292                CONTROL_SYSTEM_STATE_DATA::default(),
37293            )),
37294            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
37295                CURRENT_EVENT_SEQUENCE_DATA::default(),
37296            )),
37297            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
37298            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
37299            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
37300                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
37301            )),
37302            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
37303            DEBUG_FLOAT_ARRAY_DATA::ID => {
37304                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
37305            }
37306            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
37307            DISTANCE_SENSOR_DATA::ID => {
37308                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
37309            }
37310            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
37311            EKF_EXT_DATA::ID => Some(Self::EKF_EXT(EKF_EXT_DATA::default())),
37312            ENCAPSULATED_DATA_DATA::ID => {
37313                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
37314            }
37315            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
37316            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
37317            ESTIMATOR_STATUS_DATA::ID => {
37318                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
37319            }
37320            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
37321            EXTENDED_SYS_STATE_DATA::ID => {
37322                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
37323            }
37324            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
37325            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
37326                FILE_TRANSFER_PROTOCOL_DATA::default(),
37327            )),
37328            FLIGHT_INFORMATION_DATA::ID => {
37329                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
37330            }
37331            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
37332            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
37333            FW_SOARING_DATA_DATA::ID => {
37334                Some(Self::FW_SOARING_DATA(FW_SOARING_DATA_DATA::default()))
37335            }
37336            GENERATOR_STATUS_DATA::ID => {
37337                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
37338            }
37339            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
37340                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
37341            )),
37342            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
37343                GIMBAL_DEVICE_INFORMATION_DATA::default(),
37344            )),
37345            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
37346                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
37347            )),
37348            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
37349                GIMBAL_MANAGER_INFORMATION_DATA::default(),
37350            )),
37351            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
37352                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
37353            )),
37354            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37355                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
37356                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
37357                ))
37358            }
37359            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
37360                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
37361            )),
37362            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
37363                GIMBAL_MANAGER_STATUS_DATA::default(),
37364            )),
37365            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
37366                GLOBAL_POSITION_INT_DATA::default(),
37367            )),
37368            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
37369                GLOBAL_POSITION_INT_COV_DATA::default(),
37370            )),
37371            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37372                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
37373                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
37374                ))
37375            }
37376            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
37377            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
37378            GPS_GLOBAL_ORIGIN_DATA::ID => {
37379                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
37380            }
37381            GPS_INJECT_DATA_DATA::ID => {
37382                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
37383            }
37384            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
37385            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
37386            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
37387            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
37388            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
37389            GSM_LINK_STATUS_DATA::ID => {
37390                Some(Self::GSM_LINK_STATUS(GSM_LINK_STATUS_DATA::default()))
37391            }
37392            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
37393            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
37394            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
37395            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
37396            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
37397                HIL_ACTUATOR_CONTROLS_DATA::default(),
37398            )),
37399            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
37400            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
37401            HIL_OPTICAL_FLOW_DATA::ID => {
37402                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
37403            }
37404            HIL_RC_INPUTS_RAW_DATA::ID => {
37405                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
37406            }
37407            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
37408            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
37409            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
37410                HIL_STATE_QUATERNION_DATA::default(),
37411            )),
37412            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
37413            HYGROMETER_SENSOR_DATA::ID => {
37414                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
37415            }
37416            ILLUMINATOR_STATUS_DATA::ID => {
37417                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
37418            }
37419            ISBD_LINK_STATUS_DATA::ID => {
37420                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
37421            }
37422            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
37423            LINK_NODE_STATUS_DATA::ID => {
37424                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
37425            }
37426            LOCAL_POSITION_NED_DATA::ID => {
37427                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
37428            }
37429            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
37430                LOCAL_POSITION_NED_COV_DATA::default(),
37431            )),
37432            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37433                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
37434                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
37435                ))
37436            }
37437            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
37438            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
37439            LOGGING_DATA_ACKED_DATA::ID => {
37440                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
37441            }
37442            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
37443            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
37444            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
37445            LOG_REQUEST_DATA_DATA::ID => {
37446                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
37447            }
37448            LOG_REQUEST_END_DATA::ID => {
37449                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
37450            }
37451            LOG_REQUEST_LIST_DATA::ID => {
37452                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
37453            }
37454            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
37455            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
37456            MANUAL_SETPOINT_DATA::ID => {
37457                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
37458            }
37459            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
37460            MESSAGE_INTERVAL_DATA::ID => {
37461                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
37462            }
37463            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
37464            MISSION_CLEAR_ALL_DATA::ID => {
37465                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
37466            }
37467            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
37468            MISSION_CURRENT_DATA::ID => {
37469                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
37470            }
37471            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
37472            MISSION_ITEM_INT_DATA::ID => {
37473                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
37474            }
37475            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
37476                MISSION_ITEM_REACHED_DATA::default(),
37477            )),
37478            MISSION_REQUEST_DATA::ID => {
37479                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
37480            }
37481            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
37482                MISSION_REQUEST_INT_DATA::default(),
37483            )),
37484            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
37485                MISSION_REQUEST_LIST_DATA::default(),
37486            )),
37487            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
37488                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
37489            )),
37490            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
37491                MISSION_SET_CURRENT_DATA::default(),
37492            )),
37493            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
37494                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
37495            )),
37496            MOUNT_ORIENTATION_DATA::ID => {
37497                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
37498            }
37499            NAMED_VALUE_FLOAT_DATA::ID => {
37500                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
37501            }
37502            NAMED_VALUE_INT_DATA::ID => {
37503                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
37504            }
37505            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
37506                NAV_CONTROLLER_OUTPUT_DATA::default(),
37507            )),
37508            OBSTACLE_DISTANCE_DATA::ID => {
37509                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
37510            }
37511            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
37512            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
37513                ONBOARD_COMPUTER_STATUS_DATA::default(),
37514            )),
37515            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
37516                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
37517            )),
37518            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
37519                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
37520            )),
37521            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
37522                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
37523            )),
37524            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
37525                OPEN_DRONE_ID_LOCATION_DATA::default(),
37526            )),
37527            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
37528                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
37529            )),
37530            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
37531                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
37532            )),
37533            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
37534                OPEN_DRONE_ID_SELF_ID_DATA::default(),
37535            )),
37536            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
37537                OPEN_DRONE_ID_SYSTEM_DATA::default(),
37538            )),
37539            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
37540                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
37541            )),
37542            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
37543            OPTICAL_FLOW_RAD_DATA::ID => {
37544                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
37545            }
37546            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
37547                ORBIT_EXECUTION_STATUS_DATA::default(),
37548            )),
37549            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
37550            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
37551                PARAM_EXT_REQUEST_LIST_DATA::default(),
37552            )),
37553            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
37554                PARAM_EXT_REQUEST_READ_DATA::default(),
37555            )),
37556            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
37557            PARAM_EXT_VALUE_DATA::ID => {
37558                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
37559            }
37560            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
37561            PARAM_REQUEST_LIST_DATA::ID => {
37562                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
37563            }
37564            PARAM_REQUEST_READ_DATA::ID => {
37565                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
37566            }
37567            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
37568            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
37569            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
37570            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
37571            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
37572            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
37573                POSITION_TARGET_GLOBAL_INT_DATA::default(),
37574            )),
37575            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
37576                POSITION_TARGET_LOCAL_NED_DATA::default(),
37577            )),
37578            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
37579            PROTOCOL_VERSION_DATA::ID => {
37580                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
37581            }
37582            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
37583            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
37584            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
37585            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
37586            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
37587            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
37588                RC_CHANNELS_OVERRIDE_DATA::default(),
37589            )),
37590            RC_CHANNELS_RAW_DATA::ID => {
37591                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
37592            }
37593            RC_CHANNELS_SCALED_DATA::ID => {
37594                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
37595            }
37596            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
37597                REQUEST_DATA_STREAM_DATA::default(),
37598            )),
37599            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
37600            RESOURCE_REQUEST_DATA::ID => {
37601                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
37602            }
37603            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
37604                RESPONSE_EVENT_ERROR_DATA::default(),
37605            )),
37606            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
37607                SAFETY_ALLOWED_AREA_DATA::default(),
37608            )),
37609            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
37610                SAFETY_SET_ALLOWED_AREA_DATA::default(),
37611            )),
37612            SATCOM_LINK_STATUS_DATA::ID => {
37613                Some(Self::SATCOM_LINK_STATUS(SATCOM_LINK_STATUS_DATA::default()))
37614            }
37615            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
37616            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
37617            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
37618            SCALED_PRESSURE_DATA::ID => {
37619                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
37620            }
37621            SCALED_PRESSURE2_DATA::ID => {
37622                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
37623            }
37624            SCALED_PRESSURE3_DATA::ID => {
37625                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
37626            }
37627            SENSORPOD_STATUS_DATA::ID => {
37628                Some(Self::SENSORPOD_STATUS(SENSORPOD_STATUS_DATA::default()))
37629            }
37630            SENSOR_AIRFLOW_ANGLES_DATA::ID => Some(Self::SENSOR_AIRFLOW_ANGLES(
37631                SENSOR_AIRFLOW_ANGLES_DATA::default(),
37632            )),
37633            SENS_ATMOS_DATA::ID => Some(Self::SENS_ATMOS(SENS_ATMOS_DATA::default())),
37634            SENS_BATMON_DATA::ID => Some(Self::SENS_BATMON(SENS_BATMON_DATA::default())),
37635            SENS_MPPT_DATA::ID => Some(Self::SENS_MPPT(SENS_MPPT_DATA::default())),
37636            SENS_POWER_DATA::ID => Some(Self::SENS_POWER(SENS_POWER_DATA::default())),
37637            SENS_POWER_BOARD_DATA::ID => {
37638                Some(Self::SENS_POWER_BOARD(SENS_POWER_BOARD_DATA::default()))
37639            }
37640            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
37641            SERVO_OUTPUT_RAW_DATA::ID => {
37642                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
37643            }
37644            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
37645            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
37646                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
37647            )),
37648            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
37649                SET_ATTITUDE_TARGET_DATA::default(),
37650            )),
37651            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
37652                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
37653            )),
37654            SET_HOME_POSITION_DATA::ID => {
37655                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
37656            }
37657            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
37658            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
37659                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
37660            )),
37661            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
37662                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
37663            )),
37664            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
37665            SMART_BATTERY_INFO_DATA::ID => {
37666                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
37667            }
37668            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
37669            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
37670                STORAGE_INFORMATION_DATA::default(),
37671            )),
37672            SUPPORTED_TUNES_DATA::ID => {
37673                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
37674            }
37675            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
37676            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
37677            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
37678            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
37679            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
37680            TERRAIN_REQUEST_DATA::ID => {
37681                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
37682            }
37683            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
37684            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
37685                TIME_ESTIMATE_TO_TARGET_DATA::default(),
37686            )),
37687            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37688                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
37689                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
37690                ))
37691            }
37692            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37693                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
37694                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
37695                ))
37696            }
37697            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
37698            UAVCAN_NODE_INFO_DATA::ID => {
37699                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
37700            }
37701            UAVCAN_NODE_STATUS_DATA::ID => {
37702                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
37703            }
37704            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
37705                UTM_GLOBAL_POSITION_DATA::default(),
37706            )),
37707            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
37708            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
37709            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
37710            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
37711                VICON_POSITION_ESTIMATE_DATA::default(),
37712            )),
37713            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
37714                VIDEO_STREAM_INFORMATION_DATA::default(),
37715            )),
37716            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
37717                VIDEO_STREAM_STATUS_DATA::default(),
37718            )),
37719            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
37720                VISION_POSITION_ESTIMATE_DATA::default(),
37721            )),
37722            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
37723                VISION_SPEED_ESTIMATE_DATA::default(),
37724            )),
37725            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
37726            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
37727            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
37728            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
37729            _ => None,
37730        }
37731    }
37732    #[cfg(feature = "arbitrary")]
37733    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
37734        match id {
37735            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
37736                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
37737            )),
37738            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
37739                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
37740            )),
37741            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
37742            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
37743            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
37744            ASLCTRL_DATA_DATA::ID => Some(Self::ASLCTRL_DATA(ASLCTRL_DATA_DATA::random(rng))),
37745            ASLCTRL_DEBUG_DATA::ID => Some(Self::ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA::random(rng))),
37746            ASLUAV_STATUS_DATA::ID => Some(Self::ASLUAV_STATUS(ASLUAV_STATUS_DATA::random(rng))),
37747            ASL_OBCTRL_DATA::ID => Some(Self::ASL_OBCTRL(ASL_OBCTRL_DATA::random(rng))),
37748            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
37749            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
37750                ATTITUDE_QUATERNION_DATA::random(rng),
37751            )),
37752            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
37753                ATTITUDE_QUATERNION_COV_DATA::random(rng),
37754            )),
37755            ATTITUDE_TARGET_DATA::ID => {
37756                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
37757            }
37758            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
37759            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
37760            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37761                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
37762                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
37763                ))
37764            }
37765            AUTOPILOT_VERSION_DATA::ID => {
37766                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
37767            }
37768            AVAILABLE_MODES_DATA::ID => {
37769                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
37770            }
37771            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
37772                AVAILABLE_MODES_MONITOR_DATA::random(rng),
37773            )),
37774            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
37775            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
37776            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
37777            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
37778                CAMERA_CAPTURE_STATUS_DATA::random(rng),
37779            )),
37780            CAMERA_FOV_STATUS_DATA::ID => {
37781                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
37782            }
37783            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
37784                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
37785            )),
37786            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
37787                CAMERA_INFORMATION_DATA::random(rng),
37788            )),
37789            CAMERA_SETTINGS_DATA::ID => {
37790                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
37791            }
37792            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
37793                CAMERA_THERMAL_RANGE_DATA::random(rng),
37794            )),
37795            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
37796                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
37797            )),
37798            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
37799                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
37800            )),
37801            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
37802            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
37803            CAN_FILTER_MODIFY_DATA::ID => {
37804                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
37805            }
37806            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
37807            CELLULAR_CONFIG_DATA::ID => {
37808                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
37809            }
37810            CELLULAR_STATUS_DATA::ID => {
37811                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
37812            }
37813            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
37814                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
37815            )),
37816            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
37817                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
37818            )),
37819            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
37820            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
37821            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
37822            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
37823            COMMAND_INT_STAMPED_DATA::ID => Some(Self::COMMAND_INT_STAMPED(
37824                COMMAND_INT_STAMPED_DATA::random(rng),
37825            )),
37826            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
37827            COMMAND_LONG_STAMPED_DATA::ID => Some(Self::COMMAND_LONG_STAMPED(
37828                COMMAND_LONG_STAMPED_DATA::random(rng),
37829            )),
37830            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
37831                COMPONENT_INFORMATION_DATA::random(rng),
37832            )),
37833            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
37834                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
37835            )),
37836            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
37837                COMPONENT_METADATA_DATA::random(rng),
37838            )),
37839            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
37840                CONTROL_SYSTEM_STATE_DATA::random(rng),
37841            )),
37842            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
37843                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
37844            )),
37845            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
37846            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
37847            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
37848                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
37849            )),
37850            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
37851            DEBUG_FLOAT_ARRAY_DATA::ID => {
37852                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
37853            }
37854            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
37855            DISTANCE_SENSOR_DATA::ID => {
37856                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
37857            }
37858            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
37859            EKF_EXT_DATA::ID => Some(Self::EKF_EXT(EKF_EXT_DATA::random(rng))),
37860            ENCAPSULATED_DATA_DATA::ID => {
37861                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
37862            }
37863            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
37864            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
37865            ESTIMATOR_STATUS_DATA::ID => {
37866                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
37867            }
37868            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
37869            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
37870                EXTENDED_SYS_STATE_DATA::random(rng),
37871            )),
37872            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
37873            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
37874                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
37875            )),
37876            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
37877                FLIGHT_INFORMATION_DATA::random(rng),
37878            )),
37879            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
37880            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
37881            FW_SOARING_DATA_DATA::ID => {
37882                Some(Self::FW_SOARING_DATA(FW_SOARING_DATA_DATA::random(rng)))
37883            }
37884            GENERATOR_STATUS_DATA::ID => {
37885                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
37886            }
37887            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
37888                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
37889            )),
37890            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
37891                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
37892            )),
37893            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
37894                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
37895            )),
37896            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
37897                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
37898            )),
37899            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
37900                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
37901            )),
37902            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37903                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
37904                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
37905                ))
37906            }
37907            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
37908                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
37909            )),
37910            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
37911                GIMBAL_MANAGER_STATUS_DATA::random(rng),
37912            )),
37913            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
37914                GLOBAL_POSITION_INT_DATA::random(rng),
37915            )),
37916            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
37917                GLOBAL_POSITION_INT_COV_DATA::random(rng),
37918            )),
37919            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37920                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
37921                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
37922                ))
37923            }
37924            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
37925            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
37926            GPS_GLOBAL_ORIGIN_DATA::ID => {
37927                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
37928            }
37929            GPS_INJECT_DATA_DATA::ID => {
37930                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
37931            }
37932            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
37933            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
37934            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
37935            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
37936            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
37937            GSM_LINK_STATUS_DATA::ID => {
37938                Some(Self::GSM_LINK_STATUS(GSM_LINK_STATUS_DATA::random(rng)))
37939            }
37940            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
37941            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
37942            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
37943            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
37944            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
37945                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
37946            )),
37947            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
37948            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
37949            HIL_OPTICAL_FLOW_DATA::ID => {
37950                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
37951            }
37952            HIL_RC_INPUTS_RAW_DATA::ID => {
37953                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
37954            }
37955            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
37956            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
37957            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
37958                HIL_STATE_QUATERNION_DATA::random(rng),
37959            )),
37960            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
37961            HYGROMETER_SENSOR_DATA::ID => {
37962                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
37963            }
37964            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
37965                ILLUMINATOR_STATUS_DATA::random(rng),
37966            )),
37967            ISBD_LINK_STATUS_DATA::ID => {
37968                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
37969            }
37970            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
37971            LINK_NODE_STATUS_DATA::ID => {
37972                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
37973            }
37974            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
37975                LOCAL_POSITION_NED_DATA::random(rng),
37976            )),
37977            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
37978                LOCAL_POSITION_NED_COV_DATA::random(rng),
37979            )),
37980            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37981                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
37982                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
37983                ))
37984            }
37985            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
37986            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
37987            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
37988                LOGGING_DATA_ACKED_DATA::random(rng),
37989            )),
37990            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
37991            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
37992            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
37993            LOG_REQUEST_DATA_DATA::ID => {
37994                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
37995            }
37996            LOG_REQUEST_END_DATA::ID => {
37997                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
37998            }
37999            LOG_REQUEST_LIST_DATA::ID => {
38000                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
38001            }
38002            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
38003            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
38004            MANUAL_SETPOINT_DATA::ID => {
38005                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
38006            }
38007            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
38008            MESSAGE_INTERVAL_DATA::ID => {
38009                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
38010            }
38011            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
38012            MISSION_CLEAR_ALL_DATA::ID => {
38013                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
38014            }
38015            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
38016            MISSION_CURRENT_DATA::ID => {
38017                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
38018            }
38019            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
38020            MISSION_ITEM_INT_DATA::ID => {
38021                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
38022            }
38023            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
38024                MISSION_ITEM_REACHED_DATA::random(rng),
38025            )),
38026            MISSION_REQUEST_DATA::ID => {
38027                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
38028            }
38029            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
38030                MISSION_REQUEST_INT_DATA::random(rng),
38031            )),
38032            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
38033                MISSION_REQUEST_LIST_DATA::random(rng),
38034            )),
38035            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
38036                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
38037            )),
38038            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
38039                MISSION_SET_CURRENT_DATA::random(rng),
38040            )),
38041            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
38042                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
38043            )),
38044            MOUNT_ORIENTATION_DATA::ID => {
38045                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
38046            }
38047            NAMED_VALUE_FLOAT_DATA::ID => {
38048                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
38049            }
38050            NAMED_VALUE_INT_DATA::ID => {
38051                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
38052            }
38053            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
38054                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
38055            )),
38056            OBSTACLE_DISTANCE_DATA::ID => {
38057                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
38058            }
38059            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
38060            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
38061                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
38062            )),
38063            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
38064                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
38065            )),
38066            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
38067                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
38068            )),
38069            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
38070                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
38071            )),
38072            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
38073                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
38074            )),
38075            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
38076                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
38077            )),
38078            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
38079                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
38080            )),
38081            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
38082                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
38083            )),
38084            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
38085                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
38086            )),
38087            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
38088                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
38089            )),
38090            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
38091            OPTICAL_FLOW_RAD_DATA::ID => {
38092                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
38093            }
38094            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
38095                ORBIT_EXECUTION_STATUS_DATA::random(rng),
38096            )),
38097            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
38098            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
38099                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
38100            )),
38101            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
38102                PARAM_EXT_REQUEST_READ_DATA::random(rng),
38103            )),
38104            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
38105            PARAM_EXT_VALUE_DATA::ID => {
38106                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
38107            }
38108            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
38109            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
38110                PARAM_REQUEST_LIST_DATA::random(rng),
38111            )),
38112            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
38113                PARAM_REQUEST_READ_DATA::random(rng),
38114            )),
38115            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
38116            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
38117            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
38118            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
38119            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
38120            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
38121                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
38122            )),
38123            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
38124                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
38125            )),
38126            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
38127            PROTOCOL_VERSION_DATA::ID => {
38128                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
38129            }
38130            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
38131            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
38132            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
38133            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
38134            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
38135            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
38136                RC_CHANNELS_OVERRIDE_DATA::random(rng),
38137            )),
38138            RC_CHANNELS_RAW_DATA::ID => {
38139                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
38140            }
38141            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
38142                RC_CHANNELS_SCALED_DATA::random(rng),
38143            )),
38144            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
38145                REQUEST_DATA_STREAM_DATA::random(rng),
38146            )),
38147            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
38148            RESOURCE_REQUEST_DATA::ID => {
38149                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
38150            }
38151            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
38152                RESPONSE_EVENT_ERROR_DATA::random(rng),
38153            )),
38154            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
38155                SAFETY_ALLOWED_AREA_DATA::random(rng),
38156            )),
38157            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
38158                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
38159            )),
38160            SATCOM_LINK_STATUS_DATA::ID => Some(Self::SATCOM_LINK_STATUS(
38161                SATCOM_LINK_STATUS_DATA::random(rng),
38162            )),
38163            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
38164            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
38165            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
38166            SCALED_PRESSURE_DATA::ID => {
38167                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
38168            }
38169            SCALED_PRESSURE2_DATA::ID => {
38170                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
38171            }
38172            SCALED_PRESSURE3_DATA::ID => {
38173                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
38174            }
38175            SENSORPOD_STATUS_DATA::ID => {
38176                Some(Self::SENSORPOD_STATUS(SENSORPOD_STATUS_DATA::random(rng)))
38177            }
38178            SENSOR_AIRFLOW_ANGLES_DATA::ID => Some(Self::SENSOR_AIRFLOW_ANGLES(
38179                SENSOR_AIRFLOW_ANGLES_DATA::random(rng),
38180            )),
38181            SENS_ATMOS_DATA::ID => Some(Self::SENS_ATMOS(SENS_ATMOS_DATA::random(rng))),
38182            SENS_BATMON_DATA::ID => Some(Self::SENS_BATMON(SENS_BATMON_DATA::random(rng))),
38183            SENS_MPPT_DATA::ID => Some(Self::SENS_MPPT(SENS_MPPT_DATA::random(rng))),
38184            SENS_POWER_DATA::ID => Some(Self::SENS_POWER(SENS_POWER_DATA::random(rng))),
38185            SENS_POWER_BOARD_DATA::ID => {
38186                Some(Self::SENS_POWER_BOARD(SENS_POWER_BOARD_DATA::random(rng)))
38187            }
38188            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
38189            SERVO_OUTPUT_RAW_DATA::ID => {
38190                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
38191            }
38192            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
38193            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
38194                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
38195            )),
38196            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
38197                SET_ATTITUDE_TARGET_DATA::random(rng),
38198            )),
38199            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
38200                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
38201            )),
38202            SET_HOME_POSITION_DATA::ID => {
38203                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
38204            }
38205            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
38206            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
38207                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
38208            )),
38209            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
38210                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
38211            )),
38212            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
38213            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
38214                SMART_BATTERY_INFO_DATA::random(rng),
38215            )),
38216            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
38217            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
38218                STORAGE_INFORMATION_DATA::random(rng),
38219            )),
38220            SUPPORTED_TUNES_DATA::ID => {
38221                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
38222            }
38223            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
38224            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
38225            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
38226            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
38227            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
38228            TERRAIN_REQUEST_DATA::ID => {
38229                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
38230            }
38231            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
38232            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
38233                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
38234            )),
38235            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
38236                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
38237                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
38238                ))
38239            }
38240            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
38241                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
38242                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
38243                ))
38244            }
38245            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
38246            UAVCAN_NODE_INFO_DATA::ID => {
38247                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
38248            }
38249            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
38250                UAVCAN_NODE_STATUS_DATA::random(rng),
38251            )),
38252            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
38253                UTM_GLOBAL_POSITION_DATA::random(rng),
38254            )),
38255            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
38256            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
38257            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
38258            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
38259                VICON_POSITION_ESTIMATE_DATA::random(rng),
38260            )),
38261            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
38262                VIDEO_STREAM_INFORMATION_DATA::random(rng),
38263            )),
38264            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
38265                VIDEO_STREAM_STATUS_DATA::random(rng),
38266            )),
38267            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
38268                VISION_POSITION_ESTIMATE_DATA::random(rng),
38269            )),
38270            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
38271                VISION_SPEED_ESTIMATE_DATA::random(rng),
38272            )),
38273            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
38274            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
38275            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
38276            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
38277            _ => None,
38278        }
38279    }
38280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
38281        match self {
38282            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
38283            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
38284            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
38285            Self::AIS_VESSEL(body) => body.ser(version, bytes),
38286            Self::ALTITUDE(body) => body.ser(version, bytes),
38287            Self::ASLCTRL_DATA(body) => body.ser(version, bytes),
38288            Self::ASLCTRL_DEBUG(body) => body.ser(version, bytes),
38289            Self::ASLUAV_STATUS(body) => body.ser(version, bytes),
38290            Self::ASL_OBCTRL(body) => body.ser(version, bytes),
38291            Self::ATTITUDE(body) => body.ser(version, bytes),
38292            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
38293            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
38294            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
38295            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
38296            Self::AUTH_KEY(body) => body.ser(version, bytes),
38297            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
38298            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
38299            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
38300            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
38301            Self::BATTERY_INFO(body) => body.ser(version, bytes),
38302            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
38303            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
38304            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
38305            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
38306            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
38307            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
38308            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
38309            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
38310            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
38311            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
38312            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
38313            Self::CANFD_FRAME(body) => body.ser(version, bytes),
38314            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
38315            Self::CAN_FRAME(body) => body.ser(version, bytes),
38316            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
38317            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
38318            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
38319            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
38320            Self::COLLISION(body) => body.ser(version, bytes),
38321            Self::COMMAND_ACK(body) => body.ser(version, bytes),
38322            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
38323            Self::COMMAND_INT(body) => body.ser(version, bytes),
38324            Self::COMMAND_INT_STAMPED(body) => body.ser(version, bytes),
38325            Self::COMMAND_LONG(body) => body.ser(version, bytes),
38326            Self::COMMAND_LONG_STAMPED(body) => body.ser(version, bytes),
38327            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
38328            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
38329            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
38330            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
38331            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
38332            Self::CURRENT_MODE(body) => body.ser(version, bytes),
38333            Self::DATA_STREAM(body) => body.ser(version, bytes),
38334            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
38335            Self::DEBUG(body) => body.ser(version, bytes),
38336            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
38337            Self::DEBUG_VECT(body) => body.ser(version, bytes),
38338            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
38339            Self::EFI_STATUS(body) => body.ser(version, bytes),
38340            Self::EKF_EXT(body) => body.ser(version, bytes),
38341            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
38342            Self::ESC_INFO(body) => body.ser(version, bytes),
38343            Self::ESC_STATUS(body) => body.ser(version, bytes),
38344            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
38345            Self::EVENT(body) => body.ser(version, bytes),
38346            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
38347            Self::FENCE_STATUS(body) => body.ser(version, bytes),
38348            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
38349            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
38350            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
38351            Self::FUEL_STATUS(body) => body.ser(version, bytes),
38352            Self::FW_SOARING_DATA(body) => body.ser(version, bytes),
38353            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
38354            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
38355            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
38356            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
38357            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
38358            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
38359            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
38360            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
38361            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
38362            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
38363            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
38364            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38365            Self::GPS2_RAW(body) => body.ser(version, bytes),
38366            Self::GPS2_RTK(body) => body.ser(version, bytes),
38367            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
38368            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
38369            Self::GPS_INPUT(body) => body.ser(version, bytes),
38370            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
38371            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
38372            Self::GPS_RTK(body) => body.ser(version, bytes),
38373            Self::GPS_STATUS(body) => body.ser(version, bytes),
38374            Self::GSM_LINK_STATUS(body) => body.ser(version, bytes),
38375            Self::HEARTBEAT(body) => body.ser(version, bytes),
38376            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
38377            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
38378            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
38379            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
38380            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
38381            Self::HIL_GPS(body) => body.ser(version, bytes),
38382            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
38383            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
38384            Self::HIL_SENSOR(body) => body.ser(version, bytes),
38385            Self::HIL_STATE(body) => body.ser(version, bytes),
38386            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
38387            Self::HOME_POSITION(body) => body.ser(version, bytes),
38388            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
38389            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
38390            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
38391            Self::LANDING_TARGET(body) => body.ser(version, bytes),
38392            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
38393            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
38394            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
38395            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
38396            Self::LOGGING_ACK(body) => body.ser(version, bytes),
38397            Self::LOGGING_DATA(body) => body.ser(version, bytes),
38398            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
38399            Self::LOG_DATA(body) => body.ser(version, bytes),
38400            Self::LOG_ENTRY(body) => body.ser(version, bytes),
38401            Self::LOG_ERASE(body) => body.ser(version, bytes),
38402            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
38403            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
38404            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
38405            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
38406            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
38407            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
38408            Self::MEMORY_VECT(body) => body.ser(version, bytes),
38409            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
38410            Self::MISSION_ACK(body) => body.ser(version, bytes),
38411            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
38412            Self::MISSION_COUNT(body) => body.ser(version, bytes),
38413            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
38414            Self::MISSION_ITEM(body) => body.ser(version, bytes),
38415            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
38416            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
38417            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
38418            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
38419            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
38420            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
38421            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
38422            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
38423            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
38424            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
38425            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
38426            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
38427            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
38428            Self::ODOMETRY(body) => body.ser(version, bytes),
38429            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
38430            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
38431            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
38432            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
38433            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
38434            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
38435            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
38436            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
38437            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
38438            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
38439            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
38440            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
38441            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
38442            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
38443            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
38444            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
38445            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
38446            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
38447            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
38448            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
38449            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
38450            Self::PARAM_SET(body) => body.ser(version, bytes),
38451            Self::PARAM_VALUE(body) => body.ser(version, bytes),
38452            Self::PING(body) => body.ser(version, bytes),
38453            Self::PLAY_TUNE(body) => body.ser(version, bytes),
38454            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
38455            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
38456            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
38457            Self::POWER_STATUS(body) => body.ser(version, bytes),
38458            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
38459            Self::RADIO_STATUS(body) => body.ser(version, bytes),
38460            Self::RAW_IMU(body) => body.ser(version, bytes),
38461            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
38462            Self::RAW_RPM(body) => body.ser(version, bytes),
38463            Self::RC_CHANNELS(body) => body.ser(version, bytes),
38464            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
38465            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
38466            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
38467            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
38468            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
38469            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
38470            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
38471            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
38472            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
38473            Self::SATCOM_LINK_STATUS(body) => body.ser(version, bytes),
38474            Self::SCALED_IMU(body) => body.ser(version, bytes),
38475            Self::SCALED_IMU2(body) => body.ser(version, bytes),
38476            Self::SCALED_IMU3(body) => body.ser(version, bytes),
38477            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
38478            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
38479            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
38480            Self::SENSORPOD_STATUS(body) => body.ser(version, bytes),
38481            Self::SENSOR_AIRFLOW_ANGLES(body) => body.ser(version, bytes),
38482            Self::SENS_ATMOS(body) => body.ser(version, bytes),
38483            Self::SENS_BATMON(body) => body.ser(version, bytes),
38484            Self::SENS_MPPT(body) => body.ser(version, bytes),
38485            Self::SENS_POWER(body) => body.ser(version, bytes),
38486            Self::SENS_POWER_BOARD(body) => body.ser(version, bytes),
38487            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
38488            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
38489            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
38490            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
38491            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
38492            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
38493            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
38494            Self::SET_MODE(body) => body.ser(version, bytes),
38495            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
38496            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
38497            Self::SIM_STATE(body) => body.ser(version, bytes),
38498            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
38499            Self::STATUSTEXT(body) => body.ser(version, bytes),
38500            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
38501            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
38502            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
38503            Self::SYS_STATUS(body) => body.ser(version, bytes),
38504            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
38505            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
38506            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
38507            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
38508            Self::TIMESYNC(body) => body.ser(version, bytes),
38509            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
38510            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
38511            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
38512            Self::TUNNEL(body) => body.ser(version, bytes),
38513            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
38514            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
38515            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
38516            Self::V2_EXTENSION(body) => body.ser(version, bytes),
38517            Self::VFR_HUD(body) => body.ser(version, bytes),
38518            Self::VIBRATION(body) => body.ser(version, bytes),
38519            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38520            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
38521            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
38522            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38523            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
38524            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
38525            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
38526            Self::WINCH_STATUS(body) => body.ser(version, bytes),
38527            Self::WIND_COV(body) => body.ser(version, bytes),
38528        }
38529    }
38530    fn extra_crc(id: u32) -> u8 {
38531        match id {
38532            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
38533            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
38534            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
38535            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
38536            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
38537            ASLCTRL_DATA_DATA::ID => ASLCTRL_DATA_DATA::EXTRA_CRC,
38538            ASLCTRL_DEBUG_DATA::ID => ASLCTRL_DEBUG_DATA::EXTRA_CRC,
38539            ASLUAV_STATUS_DATA::ID => ASLUAV_STATUS_DATA::EXTRA_CRC,
38540            ASL_OBCTRL_DATA::ID => ASL_OBCTRL_DATA::EXTRA_CRC,
38541            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
38542            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
38543            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
38544            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
38545            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
38546            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
38547            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
38548                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
38549            }
38550            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
38551            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
38552            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
38553            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
38554            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
38555            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
38556            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
38557            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
38558            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
38559            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
38560            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
38561            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
38562            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
38563            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
38564            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
38565            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
38566            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
38567            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
38568            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
38569            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
38570            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
38571            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
38572            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
38573            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
38574            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
38575            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
38576            COMMAND_INT_STAMPED_DATA::ID => COMMAND_INT_STAMPED_DATA::EXTRA_CRC,
38577            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
38578            COMMAND_LONG_STAMPED_DATA::ID => COMMAND_LONG_STAMPED_DATA::EXTRA_CRC,
38579            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
38580            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
38581            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
38582            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
38583            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
38584            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
38585            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
38586            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
38587            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
38588            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
38589            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
38590            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
38591            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
38592            EKF_EXT_DATA::ID => EKF_EXT_DATA::EXTRA_CRC,
38593            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
38594            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
38595            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
38596            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
38597            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
38598            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
38599            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
38600            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
38601            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
38602            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
38603            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
38604            FW_SOARING_DATA_DATA::ID => FW_SOARING_DATA_DATA::EXTRA_CRC,
38605            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
38606            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
38607            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
38608            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
38609            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
38610            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
38611            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
38612                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
38613            }
38614            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
38615            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
38616            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
38617            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
38618            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
38619                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
38620            }
38621            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
38622            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
38623            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
38624            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
38625            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
38626            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
38627            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
38628            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
38629            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
38630            GSM_LINK_STATUS_DATA::ID => GSM_LINK_STATUS_DATA::EXTRA_CRC,
38631            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
38632            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
38633            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
38634            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
38635            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
38636            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
38637            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
38638            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
38639            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
38640            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
38641            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
38642            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
38643            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
38644            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
38645            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
38646            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
38647            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
38648            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
38649            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
38650            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
38651            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
38652                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
38653            }
38654            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
38655            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
38656            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
38657            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
38658            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
38659            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
38660            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
38661            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
38662            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
38663            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
38664            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
38665            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
38666            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
38667            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
38668            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
38669            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
38670            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
38671            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
38672            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
38673            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
38674            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
38675            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
38676            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
38677            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
38678            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
38679            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
38680            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
38681            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
38682            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
38683            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
38684            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
38685            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
38686            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
38687            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
38688            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
38689            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
38690            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
38691            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
38692            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
38693            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
38694            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
38695            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
38696            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
38697            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
38698            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
38699            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
38700            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
38701            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
38702            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
38703            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
38704            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
38705            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
38706            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
38707            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
38708            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
38709            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
38710            PING_DATA::ID => PING_DATA::EXTRA_CRC,
38711            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
38712            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
38713            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
38714            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
38715            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
38716            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
38717            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
38718            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
38719            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
38720            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
38721            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
38722            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
38723            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
38724            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
38725            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
38726            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
38727            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
38728            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
38729            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
38730            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
38731            SATCOM_LINK_STATUS_DATA::ID => SATCOM_LINK_STATUS_DATA::EXTRA_CRC,
38732            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
38733            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
38734            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
38735            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
38736            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
38737            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
38738            SENSORPOD_STATUS_DATA::ID => SENSORPOD_STATUS_DATA::EXTRA_CRC,
38739            SENSOR_AIRFLOW_ANGLES_DATA::ID => SENSOR_AIRFLOW_ANGLES_DATA::EXTRA_CRC,
38740            SENS_ATMOS_DATA::ID => SENS_ATMOS_DATA::EXTRA_CRC,
38741            SENS_BATMON_DATA::ID => SENS_BATMON_DATA::EXTRA_CRC,
38742            SENS_MPPT_DATA::ID => SENS_MPPT_DATA::EXTRA_CRC,
38743            SENS_POWER_DATA::ID => SENS_POWER_DATA::EXTRA_CRC,
38744            SENS_POWER_BOARD_DATA::ID => SENS_POWER_BOARD_DATA::EXTRA_CRC,
38745            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
38746            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
38747            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
38748            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
38749            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
38750            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
38751            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
38752            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
38753            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
38754                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
38755            }
38756            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
38757            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
38758            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
38759            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
38760            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
38761            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
38762            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
38763            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
38764            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
38765            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
38766            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
38767            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
38768            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
38769            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
38770            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
38771                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
38772            }
38773            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
38774                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
38775            }
38776            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
38777            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
38778            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
38779            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
38780            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
38781            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
38782            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
38783            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
38784            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
38785            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
38786            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
38787            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
38788            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
38789            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
38790            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
38791            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
38792            _ => 0,
38793        }
38794    }
38795    fn target_system_id(&self) -> Option<u8> {
38796        match self {
38797            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
38798            Self::CANFD_FRAME(inner) => Some(inner.target_system),
38799            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
38800            Self::CAN_FRAME(inner) => Some(inner.target_system),
38801            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
38802            Self::COMMAND_ACK(inner) => Some(inner.target_system),
38803            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
38804            Self::COMMAND_INT(inner) => Some(inner.target_system),
38805            Self::COMMAND_INT_STAMPED(inner) => Some(inner.target_system),
38806            Self::COMMAND_LONG(inner) => Some(inner.target_system),
38807            Self::COMMAND_LONG_STAMPED(inner) => Some(inner.target_system),
38808            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
38809            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
38810            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
38811            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
38812            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
38813            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
38814            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
38815            Self::LOGGING_ACK(inner) => Some(inner.target_system),
38816            Self::LOGGING_DATA(inner) => Some(inner.target_system),
38817            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
38818            Self::LOG_ERASE(inner) => Some(inner.target_system),
38819            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
38820            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
38821            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
38822            Self::MISSION_ACK(inner) => Some(inner.target_system),
38823            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
38824            Self::MISSION_COUNT(inner) => Some(inner.target_system),
38825            Self::MISSION_ITEM(inner) => Some(inner.target_system),
38826            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
38827            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
38828            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
38829            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
38830            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
38831            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
38832            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
38833            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
38834            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
38835            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
38836            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
38837            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
38838            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
38839            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
38840            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
38841            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
38842            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
38843            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
38844            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
38845            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
38846            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
38847            Self::PARAM_SET(inner) => Some(inner.target_system),
38848            Self::PING(inner) => Some(inner.target_system),
38849            Self::PLAY_TUNE(inner) => Some(inner.target_system),
38850            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
38851            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
38852            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
38853            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
38854            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
38855            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
38856            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
38857            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
38858            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
38859            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
38860            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
38861            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
38862            Self::SET_MODE(inner) => Some(inner.target_system),
38863            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
38864            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
38865            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
38866            Self::TIMESYNC(inner) => Some(inner.target_system),
38867            Self::TUNNEL(inner) => Some(inner.target_system),
38868            Self::V2_EXTENSION(inner) => Some(inner.target_system),
38869            _ => None,
38870        }
38871    }
38872    fn target_component_id(&self) -> Option<u8> {
38873        match self {
38874            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
38875            Self::CANFD_FRAME(inner) => Some(inner.target_component),
38876            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
38877            Self::CAN_FRAME(inner) => Some(inner.target_component),
38878            Self::COMMAND_ACK(inner) => Some(inner.target_component),
38879            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
38880            Self::COMMAND_INT(inner) => Some(inner.target_component),
38881            Self::COMMAND_INT_STAMPED(inner) => Some(inner.target_component),
38882            Self::COMMAND_LONG(inner) => Some(inner.target_component),
38883            Self::COMMAND_LONG_STAMPED(inner) => Some(inner.target_component),
38884            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
38885            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
38886            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
38887            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
38888            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
38889            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
38890            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
38891            Self::LOGGING_ACK(inner) => Some(inner.target_component),
38892            Self::LOGGING_DATA(inner) => Some(inner.target_component),
38893            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
38894            Self::LOG_ERASE(inner) => Some(inner.target_component),
38895            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
38896            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
38897            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
38898            Self::MISSION_ACK(inner) => Some(inner.target_component),
38899            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
38900            Self::MISSION_COUNT(inner) => Some(inner.target_component),
38901            Self::MISSION_ITEM(inner) => Some(inner.target_component),
38902            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
38903            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
38904            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
38905            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
38906            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
38907            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
38908            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
38909            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
38910            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
38911            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
38912            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
38913            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
38914            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
38915            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
38916            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
38917            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
38918            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
38919            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
38920            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
38921            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
38922            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
38923            Self::PARAM_SET(inner) => Some(inner.target_component),
38924            Self::PING(inner) => Some(inner.target_component),
38925            Self::PLAY_TUNE(inner) => Some(inner.target_component),
38926            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
38927            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
38928            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
38929            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
38930            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
38931            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
38932            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
38933            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
38934            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
38935            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
38936            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
38937            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
38938            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
38939            Self::TIMESYNC(inner) => Some(inner.target_component),
38940            Self::TUNNEL(inner) => Some(inner.target_component),
38941            Self::V2_EXTENSION(inner) => Some(inner.target_component),
38942            _ => None,
38943        }
38944    }
38945}